Aldy Hernandez | 23 Jul 12:33 2016
Picon
Gravatar

[libiberty] does anyone use regex.c with REGEX_MALLOC?

Hi guys!

I'm looking at libiberty's use of alloca() and trying to place some 
bounded checks at alloca() call points.

Silly question, do we have any users of regex.c with REGEX_MALLOC set? 
I don't see any #define for REGEX_MALLOC anywhere in binutils or gcc, 
and it doesn't look like autoconf magic being set elsewhere.

The only reference I see to REGEX_MALLOC is in libiberty/regex.c:

/* Should we use malloc or alloca?  If REGEX_MALLOC is not defined, we
    use `alloca' instead of `malloc'.  This is because using malloc in
    re_search* or re_match* could cause memory leaks when C-g is used in
    Emacs; also, malloc is slower and causes storage fragmentation.  On
    the other hand, malloc is more portable, and easier to debug.

Not that it matters, but I see that the emacs source has its own variant 
of this file (emacs-24.5/src/regex.c).  So it's not like emacs is using 
libiberty or anything.

Another silly question, who are libiberty's consumers?  GCC and 
binutils/gdb?  Or should I be looking at additional packages for answers?

If the REGEX_MALLOC mode in regex.c is unused, can I rip it out?  I'd 
like to replace it all with alloca with a malloc fallback.

Sorry for the newbie questions, but I don't think I've ever had the... 
ahmmm.. privilege of playing in libiberty land :-).

(Continue reading)

gccadmin | 22 Jul 00:36 2016
Picon

gcc-6-20160721 is now available

Snapshot gcc-6-20160721 is now available on
  ftp://gcc.gnu.org/pub/gcc/snapshots/6-20160721/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 6 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/branches/gcc-6-branch revision 238612

You'll find:

 gcc-6-20160721.tar.bz2               Complete GCC

  MD5=eb81182b9bcb2997ff6cbe0bf3efaff5
  SHA1=d316f2d6c8e83a0e82acae891841ff8d471c17ae

Diffs from 6-20160714 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-6
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.

FX | 21 Jul 15:15 2016
Picon

Re: How do I initialize a __complex128 variable?

> How do I initialize a __complex128 variable?  I found no documentation.

$ cat a.c
#include <quadmath.h>
#include <stdlib.h>
#include <stdio.h>

int main(void)
{
  char s1[50], s2[50];
  const __complex128 z = -0.3Q + 0.1Qj;
  quadmath_snprintf (s1, sizeof(s1), "%20Qe", __real__ z);
  quadmath_snprintf (s2, sizeof(s2), "%20Qe", __imag__ z);
  printf ("(%s,%s)\n", s1, s2);
  return 0;
}

$ gcc a.c -lquadmath -W -Wall && ./a.out
(       -3.000000e-01,        1.000000e-01)

gccadmin | 21 Jul 00:36 2016
Picon

gcc-4.9-20160720 is now available

Snapshot gcc-4.9-20160720 is now available on
  ftp://gcc.gnu.org/pub/gcc/snapshots/4.9-20160720/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 4.9 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch revision 238548

You'll find:

 gcc-4.9-20160720.tar.bz2             Complete GCC

  MD5=f65ca3dadf824e67d3edc59c254a9674
  SHA1=7777bd882bdb9f872739bcff1ac6dd51bdf84817

Diffs from 4.9-20160713 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-4.9
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.

Martin Sebor | 20 Jul 22:19 2016
Picon

DejaGnu directive matching multiple messages on the same line

When multiple diagnostics for a given line in a test are expected,
I have been using the vertical bar ('|') in regular expression
arguments to DejaGnu directives like dg-error and dg-warning on
the assumption that all are matched.

This use appears to be sanctioned by the GCC TestCaseWriting Wiki
(https://gcc.gnu.org/wiki/TestCaseWriting):

   Should a line produce two errors, the regular expression can
   include an "|" (ie. a regular expression OR) between the possible
   message fragments.

   If only one of the errors is important, a better way to deal
   with the multiple errors is to check for the one you want with
   dg-error and discard the extras with dg-prune-output: ...

In a discussion of a recent patch of mine I was surprised to learn
that this use may not actually accomplish quite what's intended.
The effect of the bar operator is for the directive to match
a message on that line that contains either the left operand or
the right operand of the regex.  Which means that the directive
is appropriate when it doesn't matter which of the alternatives
matches, but not when both or all messages are expected and need
to be verified.

Is there a way to express a requirement that a single line cause
two or more diagnostic messages (in any order) each matching one
of the regex strings?

I've searched the test suite for examples but couldn't find
(Continue reading)

Andrew Pinski | 20 Jul 02:01 2016
Picon

ubsan and Dejagnu not having a big enough buffer in some cases

Hi,
  I noticed that ubsan testsuite sometimes has failures due to dejagnu
buffer gets full and we no longer match on the output any more.
As you can see from the .log file:
/data1/jenkins/workspace/BuildThunderX_native_gcc_6/gcc/gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-1.c:88:3:
runtime error: value iPASS: c-c++-common/ubsan/float-cast-overflow-1.c
  -O0  execution test

This looks like I am using a much bigger path name than what most
people use which is why I am seeing it fail.  Is there a way to
increase the buffer for dejagnu/expect so dg-output matches?  Looks
like it is limited to 500k (if I read dejagnu code correctly).

Or can/should we split up float-cast-overflow-1.c instead?

Thanks,
Andrew Pinski

gccadmin | 20 Jul 00:36 2016
Picon

gcc-5-20160719 is now available

Snapshot gcc-5-20160719 is now available on
  ftp://gcc.gnu.org/pub/gcc/snapshots/5-20160719/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 5 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/branches/gcc-5-branch revision 238500

You'll find:

 gcc-5-20160719.tar.bz2               Complete GCC

  MD5=a6aec60301c2d5136b7b06645ca14661
  SHA1=5269e79993ab1bddbccb9fb2c8b779cafad07f8c

Diffs from 5-20160712 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-5
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.

Konstantina Mitropoulou | 19 Jul 19:24 2016
Picon

[llvm-dev] LLVM Cauldron 2016 (Sep 8th, Hebden Bridge, UK) registration and call for papers now open

We are pleased to announce the first LLVM Cauldron, to be held on Thursday
September 8th 2016 in Hebden Bridge, UK. This is the day before the GNU Tools
Cauldron being held at the same venue, so we hope to take advantage of the high
concentration of compiler enthusiasts and to encourage lots of
cross-pollination between communities.

This will be a one-day conference with a single talks track and a space for
breakout sessions, birds of a feather session, and tutorials. For those that
want to give a brief description of their work, there will be lightning talks.
The meeting is free to attend and open to anyone whether a hobbyist, from
academia, or from industry, and regardless of previous experience with LLVM.
We welcome proposals for:

* technical presentations (25 minutes)
* lightning talks (5 minutes)
* birds of a feather sessions (~30 minutes)
* tutorials (60 minutes)

Please register to attend and consider submitting a talk.

Links:
* More information http://llvm.org/devmtg/2016-09/
* Registration http://goo.gl/forms/IqKzBtIYJIgEZf3G2
* Talk submission http://goo.gl/forms/iFEPwjjLhNHeFeru2

Best wishes,

The LLVM Cauldron 2016 team

(Continue reading)

David Malcolm | 19 Jul 18:05 2016
Picon

gcc/libcpp: non-UTF-8 source or execution encodings?

libcpp/charset.c has a helpful introductory comment describingcharacter
sets, including the source and execution character sets.

libcpp appears to attempt to support both UTF-8 and UTF-EBCDIC for the
source character set, via:

#if HOST_CHARSET == HOST_CHARSET_ASCII
#define SOURCE_CHARSET "UTF-8"
#define LAST_POSSIBLY_BASIC_SOURCE_CHAR 0x7e
#elif HOST_CHARSET == HOST_CHARSET_EBCDIC
#define SOURCE_CHARSET "UTF-EBCDIC"
#define LAST_POSSIBLY_BASIC_SOURCE_CHAR 0xFF
#else
#error "Unrecognized basic host character set"
#endif

though libiberty's safe-ctype.c has:

# if HOST_CHARSET == HOST_CHARSET_EBCDIC
  #error "FIXME: write tables for EBCDIC"

so presumably we only effectively support UTF-8 as the source char set.

Do we support any hosts for which the source character set is *not* UTF
-8?

Similarly, do we support any targets for which the execution character
set is *not* UTF-8?

This relates to the locations-within-string-literals patch I posted
(Continue reading)

Richard Biener | 18 Jul 20:55 2016
Picon

Re: [gimplefe] hacking pass manager

On July 18, 2016 8:28:15 PM GMT+02:00, Prasad Ghangal <prasad.ghangal <at> gmail.com> wrote:
>On 15 July 2016 at 16:13, Richard Biener <richard.guenther <at> gmail.com>
>wrote:
>> On Sun, Jul 10, 2016 at 6:13 PM, Prasad Ghangal
>> <prasad.ghangal <at> gmail.com> wrote:
>>> On 8 July 2016 at 13:13, Richard Biener <richard.guenther <at> gmail.com>
>wrote:
>>>> On Thu, Jul 7, 2016 at 9:45 PM, Prasad Ghangal
><prasad.ghangal <at> gmail.com> wrote:
>>>>> On 6 July 2016 at 14:24, Richard Biener
><richard.guenther <at> gmail.com> wrote:
>>>>>> On Wed, Jul 6, 2016 at 9:51 AM, Prasad Ghangal
><prasad.ghangal <at> gmail.com> wrote:
>>>>>>> On 30 June 2016 at 17:10, Richard Biener
><richard.guenther <at> gmail.com> wrote:
>>>>>>>> On Wed, Jun 29, 2016 at 9:13 PM, Prasad Ghangal
>>>>>>>> <prasad.ghangal <at> gmail.com> wrote:
>>>>>>>>> On 29 June 2016 at 22:15, Richard Biener
><richard.guenther <at> gmail.com> wrote:
>>>>>>>>>> On June 29, 2016 6:20:29 PM GMT+02:00, Prathamesh Kulkarni
><prathamesh.kulkarni <at> linaro.org> wrote:
>>>>>>>>>>>On 18 June 2016 at 12:02, Prasad Ghangal
><prasad.ghangal <at> gmail.com>
>>>>>>>>>>>wrote:
>>>>>>>>>>>> Hi,
>>>>>>>>>>>>
>>>>>>>>>>>> I tried hacking pass manager to execute only given passes.
>For this I
>>>>>>>>>>>> am adding new member as opt_pass *custom_pass_list to the
>function
(Continue reading)

Martin Liška | 18 Jul 16:35 2016
Picon

[DOC, RFC] Partial integration of sections: 3.18.54 x86 Options and 6.31.32 x86 Function Attributes

Hello.

As mentioned in [1], we does not fully cover all i386 target options
in [2]. Apart from that, flag explanation is more brief than we've got in [3].

One example:

[3]:
-mrecip
This option enables use of RCPSS and RSQRTSS instructions (and their vectorized variants RCPPS and
RSQRTPS) with an additional Newton-Raphson step to increase precision instead of DIVSS and SQRTSS (and
their vectorized variants) for single-precision floating-point arguments. These instructions are
generated only when -funsafe-math-optimizations is enabled together with -ffinite-math-only and
-fno-trapping-math. Note that while the throughput of the sequence is higher than the throughput of the
non-reciprocal instruction, the precision of the sequence can be decreased by up to 2 ulp (i.e. the
inverse of 1.0 equals 0.99999994).
Note that GCC implements 1.0f/sqrtf(x) in terms of RSQRTSS (or RSQRTPS) already with -ffast-math (or the
above option combination), and doesn't need -mrecip.

Also note that GCC emits the above sequence with additional Newton-Raphson step for vectorized
single-float division and vectorized sqrtf(x) already with -ffast-math (or the above option
combination), and doesn't need -mrecip. 

[2]:
‘recip’
‘no-recip’
Enable/disable the generation of RCPSS, RCPPS, RSQRTSS and RSQRTPS instructions followed an additional
Newton-Raphson step instead of doing a floating-point division. 

I'm thinking whether it would be possible to tell that 'target (options)' accepts all options as mentioned
(Continue reading)


Gmane