[Bug lto/69607] undefined reference to MAIN__._omp_fn.0 in atomic_capture-1.f with -flto

2016-02-11 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69607

vries at gcc dot gnu.org changed:

   What|Removed |Added

  Known to fail||5.3.0, 6.0

--- Comment #20 from vries at gcc dot gnu.org ---
(In reply to vries from comment #19)
> > target-1.c
> > target-2.c
> 
> Managed to reproduce with intelmic offloading:
> ...
> $ ./lean-c-intelmic/install/host/bin/x86_64-pc-linux-gnu-gcc target-1.c
> target-2.c -fopenmp -flto -flto-partition=1to1 -fno-toplevel-reorder -O2
> -save-temps 
> /tmp/ccfMdK4z.ltrans0.ltrans.o:(.gnu.offload_vars+0x0): undefined reference
> to `tgtv'
> /tmp/ccfMdK4z.ltrans0.ltrans.o:(.gnu.offload_funcs+0x0): undefined reference
> to `fn2._omp_fn.0'
> /tmp/ccfMdK4z.ltrans0.ltrans.o:(.gnu.offload_funcs+0x8): undefined reference
> to `fn3._omp_fn.2'
> /tmp/ccfMdK4z.ltrans0.ltrans.o:(.gnu.offload_funcs+0x10): undefined
> reference to `fn4._omp_fn.4'
> collect2: error: ld returned 1 exit status
> ...

Reproduced on gcc-5-branch, and verified that proposed patch fixes it.

So, fails for 6.0 trunk and 5 branch, offloading not supported on 4.9 branch,
therefore not a release regression.

[Bug c++/69774] New: Corrupted 'this' passed through lambda.

2016-02-11 Thread guille at cal dot berkeley.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69774

Bug ID: 69774
   Summary: Corrupted 'this' passed through lambda.
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: guille at cal dot berkeley.edu
  Target Milestone: ---

Created attachment 37669
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37669&action=edit
Preprocessed source

The code below compiles+runs fine on gcc 4.7, but fails on gcc version 6.0.0
20151220 (on intel Mac). 
On gcc 4.7 it outputs the same two pointers (say "0x7fff5f896ba0
0x7fff5f896ba0"), while on 6.0.0 it outputs "0x7fff5f896ba0 0x7fff5f896bc0").


#include 
#include 

struct Thread  
: std::thread
{
Thread() = default;
template  Thread(F&& task, P&&... p)
: std::thread(
 [&task] (P&&... p) { task(std::forward (p)...); }, 
 std::forward (p)...
  )
{}
Thread& operator = (Thread&& t)
{
(std::thread&)*this = std::move((std::thread&)t);
return *this;
}
};

struct A
{
int a;
Thread t;

A()
{
t = [this] { std::cerr << &a << " \n"; };
}
~A()
{
t.join();
}
};

int main()
{
A a;
std::cerr << &a.a << " \n";
return 0;
}

[Bug other/69582] [meta-bug] Cilk+

2016-02-11 Thread ryan.burn at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69582

--- Comment #5 from ryan.burn at gmail dot com ---
My copyright assignment should be set up now. Thanks.

[Bug c++/69763] _Alignof(double) in C gives different results from alignof(double) in C++

2016-02-11 Thread richard-gccbugzilla at metafoo dot co.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69763

--- Comment #3 from Richard Smith  ---
I'm pretty sure neither the C nor C++ committees intended for alignof(T) to
give different results in the different languages. And even with the rule in
[basic.align]p2, GCC can still choose to specify that the alignment requirement
of 'double' is 4 in C++, to make its C and C++ modes agree. (It's not wrong to
align a double to 4 bytes, even though GCC would prefer to 8-byte align it when
it can.)

[Bug target/66960] Add interrupt attribute to x86 backend

2016-02-11 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66960

--- Comment #5 from H.J. Lu  ---
Updated spec to clarify MXCSR register, x87 FPU and MMX register state:

The interrupt and exception handlers are called by x86 processors.  X86
hardware pushes information onto stack and calls the handler.  The
requirements are

1. Both interrupt and exception handlers must use the 'IRET' instruction,
instead of the 'RET' instruction, to return from the handlers.
2. All registers are callee-saved in interrupt and exception handlers.
3. The difference between interrupt and exception handlers is the
exception handler must pop 'ERROR_CODE' off the stack before the 'IRET'
instruction.

The design goals of interrupt and exception handlers for x86 processors
are:

1. Support both 32-bit and 64-bit modes.
2. Flexible for compilers to optimize.
3. Easy to use by programmers.

To implement interrupt and exception handlers for x86 processors, a
compiler should support:

'interrupt' attribute

Use this attribute to indicate that the specified function with
mandatory arguments is an interrupt or exception handler.  The compiler
generates function entry and exit sequences suitable for use in an
interrupt handler when this attribute is present.  The 'IRET' instruction,
instead of the 'RET' instruction, is used to return from interrupt or
exception handlers.  All registers, except for the EFLAGS register which
is restored by the 'IRET' instruction, are preserved by the compiler,
including MXCSR register, x87 FPU and MMX register state.

Since the direction flag in the FLAGS register in interrupt (exception)
handlers is undetermined, cld instruction must be emitted in function
prologue if rep string instructions are used in interrupt (exception)
handler or interrupt (exception) handler isn't a leaf function.

Any interruptible-without-stack-switch code must be compiled with
-mno-red-zone since interrupt handlers can and will, because of the
hardware design, touch the red zone.

1. interrupt handler must be declared with a mandatory pointer argument:

struct interrupt_frame;

__attribute__ ((interrupt))
void
f (struct interrupt_frame *frame)
{
...
}

and user must properly define the structure the pointer pointing to.

2. exception handler:

The exception handler is very similar to the interrupt handler with
a different mandatory function signature:

typedef unsigned int uword_t __attribute__ ((mode (__word__)));

struct interrupt_frame;

__attribute__ ((interrupt))
void
f (struct interrupt_frame *frame, uword_t error_code)
{
...
}

and compiler pops the error code off stack before the 'IRET' instruction.

The exception handler should only be used for exceptions which push an
error code and all other exceptions must use the interrupt handler.
The system will crash if the wrong handler is used.

'no_caller_saved_registers' attribute

Use this attribute to indicate that the specified function has no
caller-saved registers.  That is, all registers are callee-saved.
The compiler generates proper function entry and exit sequences to
save and restore any modified registers, except for the EFLAGS register,
including MXCSR register, x87 FPU and MMX register state.

The user can call functions specified with 'no_caller_saved_registers'
attribute from an interrupt handler without saving and restoring all
call clobbered registers.

On x86, interrupt handlers are only called by processors which push
interrupt data onto stack at the address where the normal return address
is.  Interrupt handlers must access interrupt data via pointers so that
they can update interrupt data.

[Bug c++/69775] New: thread_local extern variable causes linkage error

2016-02-11 Thread saarraz2 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69775

Bug ID: 69775
   Summary: thread_local extern variable causes linkage error
   Product: gcc
   Version: 5.3.0
Status: UNCONFIRMED
  Severity: blocker
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: saarraz2 at gmail dot com
  Target Milestone: ---

I have code equivalent to the following:

foo.hpp:

extern thread_local Foo foo;


foo.cpp:

thread_local Foo foo;



I get a linkage error:

undefined reference to `TLS init function for hhh::util::format::start'
I've seen this bug referenced multiple times before - #55800 and #59364, both
of which happened 2 years ago and state that GCC version 4.9 had fixed the
problem, yet I'm getting the same problem with GCC 5.3! (through MINGW)

[Bug bootstrap/68404] [6 Regression] PGO/LTO bootstrap failure on ppc64le

2016-02-11 Thread meissner at linux dot vnet.ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68404

--- Comment #32 from Michael Meissner  ---
On Thu, Feb 11, 2016 at 05:53:35PM +, meissner at linux dot vnet.ibm.com
wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68404
> 
> --- Comment #31 from Michael Meissner  ---
> On Thu, Feb 11, 2016 at 02:32:13AM +, bernds at gcc dot gnu.org wrote:
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68404
> > 
> > --- Comment #30 from Bernd Schmidt  ---
> > Something like this maybe? I don't know much about the machine and can't say
> > whether the earlyclobber is justified, but looking at my dumps this appears 
> > to
> > prevent the problematic peephole from triggering. No testing beyond that.
> > 
> > Index: rs6000.c
> > ===
> > --- rs6000.c(revision 233217)
> > +++ rs6000.c(working copy)
> > @@ -35801,6 +35801,9 @@ fusion_gpr_load_p (rtx addis_reg,   /* reg
> >if (!fusion_gpr_addis (addis_value, GET_MODE (addis_value)))
> >  return false;
> > 
> > +  if (reg_overlap_mentioned_p (target, addis_value))
> > +return false;
> > +
> >/* Allow sign/zero extension.  */
> >if (GET_CODE (mem) == ZERO_EXTEND
> >|| (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN))
> 
> In looking at it, I probably don't need the early clobber.  Let me play with
> it.

It turns out the earlyclobber was indeed the issue, and just eliminating the
earlyclobber and providing constraints for the combined insns allowed
profiledbootstrap with LTO to do a complete build.  Just to be sure, I also did
a profiledbootstrap with LTO and specifying -O3.

I'll submit the patches to the patches mailing list.

[Bug rtl-optimization/19705] -fno-branch-count-reg doesn't prevent decrement and branch instructions on a count register

2016-02-11 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19705

--- Comment #6 from Martin Sebor  ---
Documentation patch posted for review:
  https://gcc.gnu.org/ml/gcc-patches/2016-02/msg00809.html

[Bug c/69776] New: Wrong optimization with aliasing

2016-02-11 Thread ch3root at openwall dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69776

Bug ID: 69776
   Summary: Wrong optimization with aliasing
   Product: gcc
   Version: 5.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ch3root at openwall dot com
  Target Milestone: ---

The program:

#include 
#include 

int main()
{
  void *p = malloc(10);
  int *pi = p;
  double *pd = p;

  *pi = 1;
  printf("*pi = %d\n", *pi);

  int a = *pi;
  *pd = 0;
  *pi = a;

  printf("p = %p\n", p);
  printf("*pi = %d\n", *pi);
}

compiled with `gcc -std=c11 -pedantic -O2` prints this:

*pi = 1
p = 0x1165010
*pi = 0

The last value is wrong, it should be 1.

Tested on gcc 4.7.2, 4.9.2 and 5.2.0 -- all affected.

[Bug c/69776] Wrong optimization with aliasing

2016-02-11 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69776

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Andrew Pinski  ---
>The last value is wrong, it should be 1.

Why do you think that? 

If we look at your code:


  void *p = malloc(10);
  int *pi = p;
  double *pd = p;


<< at this point p has no effective type.

  *pi = 1;
  printf("*pi = %d\n", *pi);

<< Now it has an effective type of int or a struct containing int

  int a = *pi;

<< a read 

  *pd = 0;

<< a write to a double, it does not alias int at all so it can be moved past
the next statement

  *pi = a;

<< store via an int

Since the order of pi and pd is not specified due to different aliasing of int
and double so either can be done first



  printf("p = %p\n", p);
  printf("*pi = %d\n", *pi);

[Bug rtl-optimization/64682] [5 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu

2016-02-11 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64682

--- Comment #9 from Segher Boessenkool  ---
Author: segher
Date: Thu Feb 11 22:26:35 2016
New Revision: 233356

URL: https://gcc.gnu.org/viewcvs?rev=233356&root=gcc&view=rev
Log:
combine: More distribute_notes trouble (PR69737)

PR64682 is a problem in distribute_notes, where it has trouble putting
a REG_DEAD note for a reg that is set twice in the right spot.  My fix
for that did the wrong thing for PR69567.  And then my attempted fix
for that one made PR64682 fail again.

Instead, let's just lose the note in such complicated cases, like we
already do in certain similar cases.


PR rtl-optimization/64682
PR rtl-optimization/69567
PR rtl-optimization/69737
* combine.c (distribute_notes) : If the register is set
in I2 as well, just lose it.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/combine.c

[Bug rtl-optimization/69567] PowerPC64: cstore optimisation produces bad code

2016-02-11 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69567

--- Comment #8 from Segher Boessenkool  ---
Author: segher
Date: Thu Feb 11 22:26:35 2016
New Revision: 233356

URL: https://gcc.gnu.org/viewcvs?rev=233356&root=gcc&view=rev
Log:
combine: More distribute_notes trouble (PR69737)

PR64682 is a problem in distribute_notes, where it has trouble putting
a REG_DEAD note for a reg that is set twice in the right spot.  My fix
for that did the wrong thing for PR69567.  And then my attempted fix
for that one made PR64682 fail again.

Instead, let's just lose the note in such complicated cases, like we
already do in certain similar cases.


PR rtl-optimization/64682
PR rtl-optimization/69567
PR rtl-optimization/69737
* combine.c (distribute_notes) : If the register is set
in I2 as well, just lose it.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/combine.c

[Bug rtl-optimization/69737] [5 Regression] FAIL: gcc.c-torture/execute/pr64682.c -O2 execution test

2016-02-11 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69737

--- Comment #2 from Segher Boessenkool  ---
Author: segher
Date: Thu Feb 11 22:26:35 2016
New Revision: 233356

URL: https://gcc.gnu.org/viewcvs?rev=233356&root=gcc&view=rev
Log:
combine: More distribute_notes trouble (PR69737)

PR64682 is a problem in distribute_notes, where it has trouble putting
a REG_DEAD note for a reg that is set twice in the right spot.  My fix
for that did the wrong thing for PR69567.  And then my attempted fix
for that one made PR64682 fail again.

Instead, let's just lose the note in such complicated cases, like we
already do in certain similar cases.


PR rtl-optimization/64682
PR rtl-optimization/69567
PR rtl-optimization/69737
* combine.c (distribute_notes) : If the register is set
in I2 as well, just lose it.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/combine.c

[Bug fortran/65428] ICE on nest array constructor

2016-02-11 Thread anlauf at gmx dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65428

--- Comment #4 from Harald Anlauf  ---
I tried to follow the state of the variable "cons_state" in array.c
for the following codes:

  j = 0
  print *, (/ (/ (i, i=1,j) /) /)! no ICE

and

  print *, (/ (/ (i, i=1,0) /) /)! ICE

but did not really understand the recursive algorithm.

The two cases diverge in the for loop in check_constructor_type,
with the first one leading to sane states, but not the other.

Giving up.

[Bug c/69768] [6 Regression] Bogus -Waddress warning

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69768

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Thu Feb 11 22:55:02 2016
New Revision: 233357

URL: https://gcc.gnu.org/viewcvs?rev=233357&root=gcc&view=rev
Log:
PR c/69768
* c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
arguments for -Waddress warning.

* typeck.c (cp_build_binary_op): cp_fully_fold integer_zerop
arguments for -Waddress warning.  Fix up formatting.

* c-c++-common/Waddress-1.c: New test.

Added:
trunk/gcc/testsuite/c-c++-common/Waddress-1.c
Modified:
trunk/gcc/c/ChangeLog
trunk/gcc/c/c-typeck.c
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/typeck.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/69741] forall array scalar loop counters

2016-02-11 Thread anlauf at gmx dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69741

Harald Anlauf  changed:

   What|Removed |Added

 CC||anlauf at gmx dot de

--- Comment #3 from Harald Anlauf  ---
(In reply to Dominique d'Humieres from comment #1)
> Confirmed from 4.8 up to trunk (6.0). I don't see why the code should be
> invalid.

Sunf95 rejects it with:

  forall (ii(1)=1:3 , ii(2)=1:2)
^
"pr69741.f90", Line = 5, Column = 13: ERROR: The index-name in a FORALL header
must be a named scalar variable of type INTEGER.
^
"pr69741.f90", Line = 5, Column = 25: ERROR: The index-name in a FORALL header
must be a named scalar variable of type INTEGER.


F2008 has:

R751 forall-construct-stmt is [forall-construct-name :] FORALL
concurrent-header

The scope and attributes of an index-name in a concurrent-header in a FORALL
construct or statement are described in 16.4.

16.4, par.5:

The name of a variable that appears as an index-name in a DO CONCURRENT
construct, FORALL statement, or FORALL construct has a scope of the statement
or construct. It is a scalar variable.


Thus invalid.

[Bug tree-optimization/62630] [5/6 Regression] gcc.dg/graphite/vect-pr43423.c XFAILed

2016-02-11 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62630

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P2  |P4
 CC||law at redhat dot com

[Bug c++/69777] New: Give a warning when virtual function is devirtualized into a __cxa_pure_virtual call

2016-02-11 Thread vz-gcc at zeitlins dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69777

Bug ID: 69777
   Summary: Give a warning when virtual function is devirtualized
into a __cxa_pure_virtual call
   Product: gcc
   Version: 4.9.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vz-gcc at zeitlins dot org
  Target Milestone: ---

For the reasons of compatibility with old compilers which don't define some
Windows COM interfaces in their headers, we define these interfaces ourselves,
e.g. here:
https://github.com/wxWidgets/wxWidgets/blob/WX_3_0_2/src/msw/textentry.cpp#L92

It seems that g++ 4.9.1 is smart enough to deduce that no classes deriving from
a class declared in an anonymous namespace can exist outside of the current
translation unit and so all IAutoCompleteDropDown pointers can only point to
objects of the base IAutoCompleteDropDown type itself and then it proceeds with
devirtualizing the calls to its methods to just directly call
__cxa_pure_virtual() (i.e. instead of the usual indirect call I just see "call
__cxa_pure_virtual" in the x86 disassembly).

This is technically correct, of course, and rather impressive, but as the
generated code will always crash during run-time, couldn't g++ give a warning
when devirtualizing a function into a pure virtual call? This would have helped
me a lot when tracking down this crash (which was not totally obvious because
the stack was shifted on entry into __cxa_pure_virtual() as the calling code
temporarily changed esp register value).

I have a small (but still ~50 lines of code) example that can be used to
reproduce this behaviour, please let me know if you'd like me to attach it.

[Bug lto/69607] undefined reference to MAIN__._omp_fn.0 in atomic_capture-1.f with -flto

2016-02-11 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69607

vries at gcc dot gnu.org changed:

   What|Removed |Added

  Known to fail||5.1.0, 5.2.0

--- Comment #21 from vries at gcc dot gnu.org ---
(In reply to vries from comment #20)
> Reproduced on gcc-5-branch, and verified that proposed patch fixes it.
> 

Reproduced on 5.1, 5.2, 5.3

[Bug c/69768] [6 Regression] Bogus -Waddress warning

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69768

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Jakub Jelinek  ---
Fixed.

[Bug regression/67278] ICE: verify_gimple failed on darwin 14.5 x86_64

2016-02-11 Thread helloqirun at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67278

Qirun Zhang  changed:

   What|Removed |Added

 CC||helloqirun at gmail dot com

--- Comment #1 from Qirun Zhang  ---
This regression also crashes the current trunk.

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/home/absozero/trunk/root-gcc/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/home/absozero/trunk/root-gcc
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 6.0.0 20160211 (experimental) [trunk revision 233345] (GCC) 



$ gcc-trunk pr65491_1.c 
pr65491_1.c: In function ‘sum’:
pr65491_1.c:7:1: error: mode precision of non-integral result does not match
field size of BIT_FIELD_REF
 sum (a first, a second)
 ^~~
BIT_FIELD_REF 
pr65491_1.c:9:16: note: in statement
   return first + second;
  ~~^~~~
_6 = BIT_FIELD_REF ;
pr65491_1.c:7:1: error: mode precision of non-integral result does not match
field size of BIT_FIELD_REF
 sum (a first, a second)
 ^~~
BIT_FIELD_REF 
pr65491_1.c:9:16: note: in statement
   return first + second;
  ~~^~~~
_7 = BIT_FIELD_REF ;
pr65491_1.c:7:1: internal compiler error: verify_gimple failed
 sum (a first, a second)
 ^~~
0xb9f6a6 verify_gimple_in_cfg(function*, bool)
../../gcc/gcc/tree-cfg.c:5125
0xa92c73 execute_function_todo
../../gcc/gcc/passes.c:1958
0xa9354b execute_todo
../../gcc/gcc/passes.c:2010
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

[Bug target/21255] %R and %S are not safe to use from asms

2016-02-11 Thread helloqirun at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21255

Qirun Zhang  changed:

   What|Removed |Added

 CC||helloqirun at gmail dot com

--- Comment #9 from Qirun Zhang  ---
This regression crashes the current trunk.


$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/home/absozero/trunk/root-gcc/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/home/absozero/trunk/root-gcc
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 6.0.0 20160211 (experimental) [trunk revision 233345] (GCC) 



$ gcc-trunk pr21255-3.c 
pr21255-3.c: In function ‘f’:
pr21255-3.c:13:1: internal compiler error: in ix86_print_operand, at
config/i386/i386.c:17094
 }
 ^
0xea8432 ix86_print_operand(_IO_FILE*, rtx_def*, int)
../../gcc/gcc/config/i386/i386.c:17094
0x86830c output_operand(rtx_def*, int)
../../gcc/gcc/final.c:3843
0x868db7 output_asm_insn(char const*, rtx_def**)
../../gcc/gcc/final.c:3740
0x86aa03 final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*)
../../gcc/gcc/final.c:2624
0x86b012 final(rtx_insn*, _IO_FILE*, int)
../../gcc/gcc/final.c:2045
0x86b7c9 rest_of_handle_final
../../gcc/gcc/final.c:4441
0x86b7c9 execute
../../gcc/gcc/final.c:4516
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

[Bug target/67260] [sh] Register spill bug for sibcall+complex+softfloat

2016-02-11 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67260

--- Comment #19 from Kazumoto Kojima  ---
(In reply to Oleg Endo from comment #17)
> Kaz, what do you think?

LGTM and looks like we have no choice for 5/4.9.

[Bug target/44551] [missed optimization] AVX vextractf128 after vinsertf128

2016-02-11 Thread helloqirun at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44551

Qirun Zhang  changed:

   What|Removed |Added

 CC||helloqirun at gmail dot com

--- Comment #15 from Qirun Zhang  ---
This regression crashes the current trunk.


$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/home/absozero/trunk/root-gcc/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/home/absozero/trunk/root-gcc
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 6.0.0 20160211 (experimental) [trunk revision 233345] (GCC) 


$ gcc-trunk pr44551-1.c 
pr44551-1.c: In function ‘foo’:
pr44551-1.c:7:1: note: The ABI for passing parameters with 32-byte alignment
has changed in GCC 4.6
 foo (__m256i x, __m128i y)
 ^~~
pr44551-1.c:7:1: warning: AVX vector argument without AVX enabled changes the
ABI [-Wpsabi]
In file included from
/home/absozero/trunk/root-gcc/lib/gcc/x86_64-pc-linux-gnu/6.0.0/include/immintrin.h:41:0,
 from pr44551-1.c:4:
pr44551-1.c:9:15: error: ‘__builtin_ia32_vinsertf128_si256’ needs isa option
-m32
   __m256i r = _mm256_insertf128_si256(x, y, 1);
   ^
pr44551-1.c:9:15: internal compiler error: in emit_move_insn, at expr.c:3546
0x851c6f emit_move_insn(rtx_def*, rtx_def*)
../../gcc/gcc/expr.c:3545
0x85859d store_expr_with_bounds(tree_node*, rtx_def*, int, bool, bool,
tree_node*)
../../gcc/gcc/expr.c:5583
0x859b88 expand_assignment(tree_node*, tree_node*, bool)
../../gcc/gcc/expr.c:5175
0x74dd8a expand_call_stmt
../../gcc/gcc/cfgexpand.c:2646
0x74dd8a expand_gimple_stmt_1
../../gcc/gcc/cfgexpand.c:3536
0x74dd8a expand_gimple_stmt
../../gcc/gcc/cfgexpand.c:3702
0x74fbe8 expand_gimple_basic_block
../../gcc/gcc/cfgexpand.c:5708
0x755bf6 execute
../../gcc/gcc/cfgexpand.c:6323
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

[Bug c/69776] Wrong optimization with aliasing

2016-02-11 Thread ch3root at openwall dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69776

--- Comment #2 from Alexander Cherepanov  ---
[CC'ing Martin Sebor and Joseph S. Myers as it's potentially related to 
bug 65892.]

On 2016-02-12 01:20, pinskia at gcc dot gnu.org wrote:
>> The last value is wrong, it should be 1.
>
> Why do you think that?
>
> If we look at your code:
>
>void *p = malloc(10);
>int *pi = p;
>double *pd = p;
>
> << at this point p has no effective type.

Ok

>*pi = 1;
>printf("*pi = %d\n", *pi);
>
> << Now it has an effective type of int or a struct containing int

Structs are a separate topic (and I thinks it's still unsettled in the 
standard). Fortunately they are not relevant here. Back to int...

C11, 6.5p6: "If a value is stored into an object having no declared type 
through an lvalue having a type that is not a character type, then the 
type of the lvalue becomes the effective type of the object for that 
access and for subsequent accesses that do not modify
the stored value."

So, yes, it has an effective type of int for this store and for 
subsequent reads. But not for writes.

>int a = *pi;
>
> << a read

Yes, a read with an effective type of int.

>*pd = 0;
>
> << a write to a double, it does not alias int at all so it can be moved past
> the next statement

This is a write. Hence the previous effective type is not relevant. And 
effective type for this write and for subsequent reads is double.

>*pi = a;
>
> << store via an int
>
> Since the order of pi and pd is not specified due to different aliasing of int
> and double so either can be done first

Sorry, I don't see what the talk about moving stores could be based on. 
This is another write. So it ignores the previous effective type and 
sets a new one.

Looking at it at a higher level: I think it is generally agreed that 
allocated memory could be repurposed at will -- once you don't need old 
data you just overwrite it with new data without any regard to the 
types. I have seen proposals[1] for forbidding this technique but I 
don't think it was seriously considered. Maybe I missed it.

[1] https://gcc.gnu.org/ml/gcc/2004-12/msg00193.html

The program in this bug report is loosely based on the Example 1 in DR 
236 and I was surprised that the problematic behavior is present even 
without functions involved. The variant with a function (closer to the 
Example 1 in DR 236):

// file 1
void f(int *qi, double *qd)
{
   int i = *qi;
   *qd = 0;
   *qi = i;
}

// file 2
#include 
#include 

void f(int *qi, double *qd);

int main()
{
   void *p = malloc(10);
   int *pi = p;
   double *pd = p;

   *pi = 1;
   printf("*pi = %d\n", *pi);

   f(pi, pd);

   printf("*pi = %d\n", *pi);
}

I don't know if it should be considered the same case or a separate one. 
Most discussions about DR 236 (like in bug 65892) are concerned about 
unions and it's not clear to me if the case of allocated objects is 
settled or not, in gcc or in general. IMHO the case of allocated objects 
is easier (no tricky visibility rules) and more general but maybe I'm 
missing something.

[Bug c++/69774] Corrupted 'this' passed through lambda.

2016-02-11 Thread guille at cal dot berkeley.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69774

--- Comment #1 from Guille  ---
Note that the problem persists if we pass by reference in the lambda, i.e.
using

"t = [&] { std::cerr << &a << " \n"; };"

instead of

"t = [this] { std::cerr << &a << " \n"; };".

[Bug tree-optimization/66726] missed optimization, factor conversion out of COND_EXPR

2016-02-11 Thread kugan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66726

--- Comment #16 from kugan at gcc dot gnu.org ---
Author: kugan
Date: Fri Feb 12 00:24:22 2016
New Revision: 233362

URL: https://gcc.gnu.org/viewcvs?rev=233362&root=gcc&view=rev
Log:
gcc/ChangeLog:

2016-02-12  Kugan Vivekanandarajah  

PR middle-end/66726
* tree-ssa-reassoc.c (optimize_range_tests): Handle tcc_compare stmt
whose result is used in PHI.
(maybe_optimize_range_tests): Likewise.
(final_range_test_p): Likweise.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-reassoc.c

[Bug ipa/69708] ipa inline not working for function reference in static const struct

2016-02-11 Thread kugan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69708

kugan at gcc dot gnu.org changed:

   What|Removed |Added

 CC||kugan at gcc dot gnu.org

--- Comment #2 from kugan at gcc dot gnu.org ---
In ipa-prop.c, function ipa_compute_jump_functions_for_edge called from
determine_locally_known_aggregate_parts doesn't compute jump functions for
aggregates when they are initialized during definition.

If I change the testcase to following, it works.

typedef struct F {
int (*call)(int);
} F;

static int g(F f, int x) {
x = f.call(x);
x = f.call(x);
x = f.call(x);
x = f.call(x);
x = f.call(x);
x = f.call(x);
x = f.call(x);
x = f.call(x);
return x;
}

static int sq(int x) {
return x * x;
}

static F f = {sq};
//static const F f = {sq};

void dosomething(int);

int h(int x) {
f.call = sq;
dosomething(g(f, x));
dosomething(g((F){sq}, x));
}

I guess, for the varpool_node corresponding to static const F f = {sq};, we
have to check hat the initialization are constant and create the jump function.

I still haven't figured out how I can get the initialization list for the
structure. Any pointers?

varpool_node *node = varpool_node::get (arg); should get me to the varpool
node.

[Bug c++/69098] [5/6 regression] Member function pointer template flagged with 'is not a function template'

2016-02-11 Thread ppalka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69098

--- Comment #12 from Patrick Palka  ---
Author: ppalka
Date: Fri Feb 12 01:11:52 2016
New Revision: 233365

URL: https://gcc.gnu.org/viewcvs?rev=233365&root=gcc&view=rev
Log:
Fix PR c++/69098 (bogus errors with static data member template)

gcc/cp/ChangeLog:

PR c++/69098
* pt.c (lookup_and_finish_template_variable): New function,
extracted from ...
(tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: ... here.
(tsubst_qualified_id): Consider that EXPR might be a variable
template.
* typeck.c (check_template_keyword): Don't emit an error
if DECL is a variable template.

gcc/testsuite/ChangeLog:

PR c++/69098
* g++.dg/cpp1y/69098.C: New test.
* g++.dg/cpp1y/69098-2.C: New test.


Added:
trunk/gcc/testsuite/g++.dg/cpp1y/69098-2.C
trunk/gcc/testsuite/g++.dg/cpp1y/69098.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/cp/typeck.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/69778] New: Bogus "qualifiers cannot be applied" error with redundant (but legal) 'typename'

2016-02-11 Thread rs2740 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69778

Bug ID: 69778
   Summary: Bogus "qualifiers cannot be applied" error with
redundant (but legal) 'typename'
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rs2740 at gmail dot com
  Target Milestone: ---

Modified repro from http://stackoverflow.com/q/35352168/2756719:

struct A {
typedef int& reference;
};

void f(const A::reference);  // OK
void g(const typename A::reference); // error: 'const' qualifiers cannot be 
 // applied to 'A::reference {aka int&}'

[Bug c/69522] [4.9/5/6 Regression] gcc hangs on valid code on x86_64-linux-gnu

2016-02-11 Thread bernds at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69522

--- Comment #9 from Bernd Schmidt  ---
Author: bernds
Date: Fri Feb 12 01:38:06 2016
New Revision: 233366

URL: https://gcc.gnu.org/viewcvs?rev=233366&root=gcc&view=rev
Log:
Fix obstack use-after-free problems in C frontend, PR69522

c/
PR c/69522
* c-parser.c (c_parser_braced_init): New arg outer_obstack.  All
callers changed.  If nested_p is true, use it to call
finish_implicit_inits.
* c-tree.h (finish_implicit_inits): Declare.
* c-typeck.c (finish_implicit_inits): New function.  Move code
from ...
(push_init_level): ... here.
(set_designator, process_init_element): Call finish_implicit_inits.

testsuite/
PR c/69522
gcc.dg/pr69522.c: New test.


Added:
trunk/gcc/testsuite/gcc.dg/pr69522.c
Modified:
trunk/gcc/c/ChangeLog
trunk/gcc/c/c-parser.c
trunk/gcc/c/c-tree.h
trunk/gcc/c/c-typeck.c
trunk/gcc/testsuite/ChangeLog

[Bug c/69522] [4.9/5 Regression] gcc hangs on valid code on x86_64-linux-gnu

2016-02-11 Thread bernds at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69522

Bernd Schmidt  changed:

   What|Removed |Added

   Keywords|compile-time-hog|
 Status|NEW |ASSIGNED
Summary|[4.9/5/6 Regression] gcc|[4.9/5 Regression] gcc
   |hangs on valid code on  |hangs on valid code on
   |x86_64-linux-gnu|x86_64-linux-gnu
  Known to fail|6.0 |

--- Comment #10 from Bernd Schmidt  ---
Fixed in gcc-6 so far.

[Bug driver/69779] New: [6 Regression] Invalid free in driver::finalize on s390x running libgccjit

2016-02-11 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69779

Bug ID: 69779
   Summary: [6 Regression] Invalid free in driver::finalize on
s390x running libgccjit
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: driver
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dmalcolm at gcc dot gnu.org
  Target Milestone: ---
  Host: s390x-ibm-linux-gnu
Target: s390x-ibm-linux-gnu
 Build: s390x-ibm-linux-gnu

I'm seeing crashes running "make check-jit" on s390x-ibm-linux-gnu:
e.g. *** Error in
`/home/dmalcolm/gcc-bugfixing/build/gcc/testsuite/jit/test-volatile.c.exe':
free(): invalid pointer: 0x03fffdf30568 ***

The problem seems to be this line in driver::finalize:

#4  0x03fffcfe4582 in driver::finalize (this=) at
../../src/gcc/gcc.c:9901
9901  XDELETEVEC (specs);

where specs == static_specs i.e. we have an attempt to free a
statically-allocated array.

specs is modified by this code in set_specs:
1871  /* See if the spec already exists.  */
1872  for (sl = specs; sl; sl = sl->next)
1873if (name_len == sl->name_len && !strcmp (sl->name, name))
1874  break;
1875
1876  if (!sl)
1877{
1878  /* Not found - make it.  */
1879  sl = XNEW (struct spec_list);
1880  sl->name = xstrdup (name);
1881  sl->name_len = name_len;
1882  sl->ptr_spec = &sl->ptr;
1883  sl->alloc_p = 0;
1884  *(sl->ptr_spec) = "";
1885  sl->next = specs;
1886  sl->default_ptr = NULL;
1887  specs = sl;
1888}

i.e. it only changes "specs" from static_specs if there's a set_spec for a name
that isn't in the static specs.

The cleanup code happens to work on x86_64 as we have two calls to set_spec
that modify "specs":

  (1) It becomes static_specs in first call to set_spec, within "read_specs":
#0  set_spec (name=0x662131 "asm", 
spec=0x6616e0 "%{m16|m32:--32}  %{m16|m32|mx32:;:--64}  %{mx32:--x32} 
%{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}",
user_p=false) at ../../src/gcc/gcc.c:1872

  (2) but then becomes non-equal in 2nd call to set_spec, also within
"read_specs"
 set_spec (name=0x664fd1 "cc1_cpu", 
spec=0x65cb90 "%{march=native:%>march=native %:local_cpu_detect(arch)  
%{!mtune=*:%>mtune=native %:local_cpu_detect(tune)}}
%{mtune=native:%>mtune=native %:local_cpu_detect(tune)}", user_p=false) at
../../src/gcc/gcc.c:1890
  (and although there are many calls to set_spec, only those 2 modifiy "specs":
the first one, and cc1_cpu)

i.e. it only works for a host/target for which the "specs" file exists and has
a name of a spec that isn't in static_specs.

It fails on s390x since the specs file only has specs with the same names as
those in static_specs.

It looks like in driver::finalize that ought to be walking the list of
dynamically-allocated spec_list instances, freeing them, until we reach
static_specs.  Am testing a patch for this.

[Bug c++/67950] AIX: Illegal instruction in accept()

2016-02-11 Thread gcc at dixie dot net.nz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67950

Andrew Dixie  changed:

   What|Removed |Added

 CC||gcc at dixie dot net.nz

--- Comment #6 from Andrew Dixie  ---
Looks like duplicate of:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63435

Workaround:
diff -rupN gcc-4.9.1/gcc/symtab.c gcc-4.9.1-patched/gcc/symtab.c
--- gcc-4.9.1/gcc/symtab.c  2014-05-19 14:47:31.0 +1200
+++ gcc-4.9.1-patched/gcc/symtab.c  2014-10-02 13:01:10.354814648 +1300
@@ -1204,6 +1204,11 @@ symtab_nonoverwritable_alias_1 (symtab_n
 symtab_node *
 symtab_nonoverwritable_alias (symtab_node *node)
 {
+
+#ifdef _AIX
+  return NULL;
+#endif
+
   tree new_decl;
   symtab_node *new_node = NULL;

[Bug target/68973] [6 regression] Internal compiler error on power for gcc/testsuite/g++.dg/pr67211.C

2016-02-11 Thread amodra at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68973

--- Comment #17 from Alan Modra  ---
Created attachment 37670
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37670&action=edit
rtl dumps

dumps for pr67211.C -O3 -mcpu=power7 -fno-vect-cost-model, mainline rev 233357.

[Bug c/69776] Wrong optimization with aliasing

2016-02-11 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69776

Martin Sebor  changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org

--- Comment #3 from Martin Sebor  ---
I'm not sure if the question of dynamic memory and pointers at function scope
as applies to the test case is settled or not, or that there is consensus about
the validity of the submitted test case.  My impression is that the weakest
(mostly, within WG14) agreed-upon requirement on implementations is the visible
union rule (N1520).  Under it, I would expect the following slightly changed
test case to produce the expected output (1 1).  It doesn't with GCC and I
would be more inclined to view that as a bug than the original test case (GCC
isn't the only compiler that fails this test).  The next weakest requirement is
that the effective type of an object cannot change after it's set.  I suspect
that's too weak to be useful in general.

#include 
#include 

int main()
{
  void *p = malloc(10);

  union {
int *pi;
double *pd;
  } u = { .pi = p };

  *u.pi = 1;

  printf("*pi = %d\n", *u.pi);

  int a = *u.pi;

  *u.pd = 0;

  *u.pi = a;

  printf("p = %p\n", p);
  printf("*pi = %d\n", *u.pi);
}

[Bug c++/69774] Corrupted 'this' passed through lambda.

2016-02-11 Thread rs2740 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69774

TC  changed:

   What|Removed |Added

 CC||rs2740 at gmail dot com

--- Comment #2 from TC  ---
You have a dangling reference - the lambda in Thread's constructor captures
`task` by reference, and in this case `task` is bound to the temporary object
created by the lambda expression in A's constructor, which is immediately
destroyed at the semicolon.

[Bug driver/69779] [6 Regression] Invalid free in driver::finalize on s390x running libgccjit

2016-02-11 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69779

David Malcolm  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2016-02-12
   Assignee|unassigned at gcc dot gnu.org  |dmalcolm at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from David Malcolm  ---
Candidate patch posted as:
  https://gcc.gnu.org/ml/gcc-patches/2016-02/msg00830.html

[Bug middle-end/69780] New: ICE on __builtin_alloca_with_align with small alignment

2016-02-11 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69780

Bug ID: 69780
   Summary: ICE on  __builtin_alloca_with_align with small
alignment
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

The following causes an ICE in today's trunk on at least powerpc64le and
x86_64.  The ICE disappears with optimization.  I'm guessing at the affected
component.

Even though my 5.1.0 compiles the code fine, based on my bisection the ICE
first appeared in r186681.

I realize __builtin_alloca_with_align() is undocumented (and apparently
untested by unit tests of its own).  It's also possible that the test case
below is invalid.  I uncovered this problem while attempting to add
documentation for it (to resolve bug 69759).

$ cat x.c && /build/gcc-trunk/gcc/xgcc -B /build/gcc-trunk/gcc -Wall -Wextra
-Wpedantic -xc x.c
void bar (void)
{
  void *p = __builtin_alloca_with_align (1, 1);
}
x.c: In function ‘bar’:
x.c:3:9: warning: unused variable ‘p’ [-Wunused-variable]
   void *p = __builtin_alloca_with_align (1, 1);
 ^
x.c:3:9: internal compiler error: RTL flag check: REG_POINTER used with
unexpected rtx code 'const_int' in mark_reg_pointer, at emit-rtl.c:1316
   void *p = __builtin_alloca_with_align (1, 1);
 ^
0x10c5e26f rtl_check_failed_flag(char const*, rtx_def const*, char const*, int,
char const*)
/src/gcc/trunk/gcc/rtl.c:878
0x106d267f mark_reg_pointer(rtx_def*, int)
/src/gcc/trunk/gcc/emit-rtl.c:1316
0x10708427 allocate_dynamic_stack_space(rtx_def*, unsigned int, unsigned int,
bool)
/src/gcc/trunk/gcc/explow.c:1495
0x104fd04f expand_builtin_alloca
/src/gcc/trunk/gcc/builtins.c:4343
0x10504873 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)
/src/gcc/trunk/gcc/builtins.c:5876
0x10754e63 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/src/gcc/trunk/gcc/expr.c:10572
0x10746b23 expand_expr_real(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/src/gcc/trunk/gcc/expr.c:7947
0x1073b4bf store_expr_with_bounds(tree_node*, rtx_def*, int, bool, bool,
tree_node*)
/src/gcc/trunk/gcc/expr.c:5409
0x10739c3b expand_assignment(tree_node*, tree_node*, bool)
/src/gcc/trunk/gcc/expr.c:5175
0x1054985f expand_call_stmt
/src/gcc/trunk/gcc/cfgexpand.c:2646
0x1054d4e7 expand_gimple_stmt_1
/src/gcc/trunk/gcc/cfgexpand.c:3536
0x1054dddf expand_gimple_stmt
/src/gcc/trunk/gcc/cfgexpand.c:3702
0x10557533 expand_gimple_basic_block
/src/gcc/trunk/gcc/cfgexpand.c:5708
0x1055975b execute
/src/gcc/trunk/gcc/cfgexpand.c:6323
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
$

[Bug target/67260] [sh] Register spill bug for sibcall+complex+softfloat

2016-02-11 Thread bugdal at aerifal dot cx
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67260

--- Comment #20 from Rich Felker  ---
The (second) patch in comment 17 seems to have fixed the build failure for
musl's complex math functions where I first encountered the problem.

[Bug bootstrap/69781] New: [6 Regression] r233362 breaks PGO/LTO bootstrap on ppc64le

2016-02-11 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69781

Bug ID: 69781
   Summary: [6 Regression] r233362 breaks PGO/LTO bootstrap on
ppc64le
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: trippels at gcc dot gnu.org
CC: kugan at gcc dot gnu.org
  Target Milestone: ---
Target: ppc64le

r233362 causes gcc to ICE all over the place during PGO/LTO bootstrap:

../../gcc/gcc/bb-reorder.c: In member function ‘execute’:
../../gcc/gcc/bb-reorder.c:2557:1: internal compiler error: in
tree_node_structure_for_code, at tree.c:481
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[4]: *** [/home/trippels/tmp/cceUBSgY.ltrans18.ltrans.o] Error 1
make[4]: *** Waiting for unfinished jobs
../../gcc/gcc/tree-ssa-sccvn.c: In function ‘vn_reference_lookup’:
../../gcc/gcc/tree-ssa-sccvn.c:2264:4: warning: ‘valuezied_anything’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
|| !ao_ref_init_from_vn_reference (&r, vr1.set, vr1.type,
^
../../gcc/gcc/tree-ssa-sccvn.c:2242:8: note: ‘valuezied_anything’ was declared
here
   bool valuezied_anything;
^
../../gcc/gcc/config/rs6000/predicates.md: In function ‘vsx_register_operand’:
../../gcc/gcc/config/rs6000/predicates.md:67:0: internal compiler error: in
mark_operand_necessary, at tree-ssa-dce.c:166
 ;; (either altivec or VSX).

Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[4]: *** [/home/trippels/tmp/cceUBSgY.ltrans5.ltrans.o] Error 1
../../gcc/gcc/config/rs6000/predicates.md: In function
‘cc_reg_not_cr0_operand’:
../../gcc/gcc/config/rs6000/predicates.md:431:0: internal compiler error: in
mark_operand_necessary, at tree-ssa-dce.c:160
 (define_predicate "cc_reg_not_micro_cr0_operand"

Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[4]: *** [/home/trippels/tmp/cceUBSgY.ltrans22.ltrans.o] Error 1
../../gcc/gcc/expmed.c: In function ‘expand_shift_1’:
../../gcc/gcc/expmed.c:2288:1: internal compiler error: in
insert_value_copy_on_edge, at tree-outof-ssa.c:296
 expand_shift_1 (enum tree_code code, machine_mode mode, rtx shifted,
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[4]: *** [/home/trippels/tmp/cceUBSgY.ltrans15.ltrans.o] Error 1

[Bug tree-optimization/66726] missed optimization, factor conversion out of COND_EXPR

2016-02-11 Thread kugan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66726

--- Comment #17 from kugan at gcc dot gnu.org ---
Author: kugan
Date: Fri Feb 12 06:40:55 2016
New Revision: 233368

URL: https://gcc.gnu.org/viewcvs?rev=233368&root=gcc&view=rev
Log:
2016-02-12  Kugan Vivekanandarajah  

revert:
2016-02-12  Kugan Vivekanandarajah  

PR middle-end/66726
* tree-ssa-reassoc.c (optimize_range_tests): Handle tcc_compare stmt
whose result is used in PHI.
(maybe_optimize_range_tests): Likewise.
(final_range_test_p): Likweise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-reassoc.c

[Bug bootstrap/69781] [6 Regression] r233362 breaks PGO/LTO bootstrap on ppc64le

2016-02-11 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69781

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Markus Trippelsdorf  ---
The revision was reverted.

[Bug rtl-optimization/69291] [6 Regression] wrong code at -O1 for ruby-2.3.0/regcomp.c:985:compile_length_quantifier_node()

2016-02-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69291

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #12 from Richard Biener  ---
Fixed.

[Bug rtl-optimization/69291] [6 Regression] wrong code at -O1 for ruby-2.3.0/regcomp.c:985:compile_length_quantifier_node()

2016-02-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69291

--- Comment #13 from Richard Biener  ---
Author: rguenth
Date: Thu Feb 11 08:11:52 2016
New Revision: 233316

URL: https://gcc.gnu.org/viewcvs?rev=233316&root=gcc&view=rev
Log:
2016-02-11  Richard Biener  

PR rtl-optimization/69291
* ifcvt.c (noce_try_store_flag_constants): Do not allow
subexpressions affected by changing the result.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/ifcvt.c

[Bug bootstrap/69725] LTO/PGO bootstrap fails with in-tree gmp

2016-02-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69725

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed|2016-02-09 00:00:00 |2016-02-11
 Ever confirmed|0   |1

--- Comment #12 from Richard Biener  ---
Confirmed.  I suspect it's coverage mismatch errors causing the issue.

[Bug c/69746] [6 Regression] diagnostic about non-constant expression not helpful

2016-02-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69746

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #2 from Richard Biener  ---
Ok, I see.

[Bug c++/69694] type incomplete depending if constructing function is templated

2016-02-11 Thread bloerwald at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69694

--- Comment #2 from bloerwald at googlemail dot com ---
(In reply to Patrick Palka from comment #1)
> g++ 4.9 compiles this successfully, g++ 5.1 doesn't, neither does trunk.

The original testcase as well as the code it was reduced from failed on 4.9.2
as well. Is this still the same issue?

[Bug c/69760] Wrong 64-bit memory address caused by an unneeded overflowing 32-bit integer multiplication on x86_64 under -O2 and -O3 code optimization

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69760

Jakub Jelinek  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
   Last reconfirmed||2016-02-11
 CC||jakub at gcc dot gnu.org
 Resolution|INVALID |---
 Ever confirmed|0   |1

--- Comment #2 from Jakub Jelinek  ---
Actually, -fsanitize=undefined reports nothing here, and -fno-ivopts fixes it.

[Bug bootstrap/69725] LTO/PGO bootstrap fails with in-tree gmp

2016-02-11 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69725

--- Comment #13 from Markus Trippelsdorf  ---
(In reply to Richard Biener from comment #12)
> Confirmed.  I suspect it's coverage mismatch errors causing the issue.

No. The file in question changes between stages as shown in comment 10.
PGO of course can not work in this case.

[Bug c++/69756] Passing a multidimensional variable-length array into a lambda (by reference) causes an error

2016-02-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69756

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-02-11
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
We ICE expanding _4(D) in

_5 = _4(D) /[ex] 4;

But

(gdb) p context
$7 = 
(gdb) p current_function_decl
$8 = 

for its underlying decl.  So we somehow failed to properly remap things here
(and appearantly have no verification for this).

[Bug c++/69753] [6 Regression] bogus: expected primary-expression before ‘>’ token

2016-02-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69753

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1
Version|unknown |6.0

[Bug target/69747] c6x cross-compiler fails with "Error: inconsistent uses of .cfi_sections"

2016-02-11 Thread dhowells at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69747

--- Comment #3 from dhowells at redhat dot com  ---
Hmmm...  It works with binutils-2.25, so it looks like it may be.

[Bug c++/69756] Passing a multidimensional variable-length array into a lambda (by reference) causes an error

2016-02-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69756

Richard Biener  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code,
   ||wrong-code
  Known to fail||4.7.4, 6.0

--- Comment #2 from Richard Biener  ---
Ok, it's that way already during into-SSA.

It seems that we gimplify type sizes and end up using the main()s type size
in the lambda which is uninitialized there:

main():: (const struct __lambda0 * const __closure)
{
  sizetype D.2424;
  sizetype D.2425;
  int[0:D.2357][0:D.2347] * D.2426;
  int[0:(sizetype) __closure->__array.max][0:D.2357][0:D.2347] & array
[value-expr: (int[0:(sizetype) __closure->__array.max][0:D.2357][0:D.2347] &)
__closure->__array.ptr];

  {
int i4;
int i5;
int i6;
int output;
typedef struct ._0 ._0;

i4 = 1;
i5 = 2;
i6 = 3;
D.2424 = D.2371 /[ex] 4;

D.2371 is defined in main().

This hits at invalid tree (type) sharing between functions and/or invalid
gimplification or un-nesting.  Not sure how lambdas are exactly implemented.

[Bug target/69747] c6x cross-compiler fails with "Error: inconsistent uses of .cfi_sections"

2016-02-11 Thread dhowells at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69747

--- Comment #4 from dhowells at redhat dot com  ---
OTOH, looking at the output from gcc, I see:

...
.cfi_sections   .debug_frame
.align  2
.global main
.cfi_sections .debug_frame, .c6xabi.exidx
...

binutils-2.25 is okay with this.  If I add ", .c6xabi.exidx" to the end of the
first .cfi_sections directive, binutils-2.26 is okay also.  It may be that
binutils has got more strict and this is actually a gcc bug.

[Bug rtl-optimization/59811] [4.9/5/6 Regression] Huge increase in memory usage and compile time in combine

2016-02-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59811

--- Comment #13 from Richard Biener  ---
(In reply to Jeffrey A. Law from comment #12)
> So Jan fixed the combine issue when he committed his changes to remove
> statements which set write-only variables.  That essentially brought the
> combiner down to nothing.  Hard to believe since it was just a dozen or so
> nodes that were determined to be write-only.  But that was double-checked by
> just hacking out the call to set_writeonly_bit in one of the older compilers
> I was testing.
> 
> Richi's change to improve DOM's handling of aliased loads helps considerably
> if someone were to disable the IPA propagation bits.
> 
> Unfortunately we're still burning a lot of time in the alias walking.  So we
> can't reasonably consider this resolved for gcc-6:
> 
> 
>  alias stmt walking  :  38.67 (64%) usr   0.01 ( 7%) sys  38.64 (64%)
> wall   2 kB ( 0%) ggc
>  tree copy propagation   :   0.01 ( 0%) usr   0.00 ( 0%) sys   0.00 ( 0%)
> wall   0 kB ( 0%) ggc
>  combiner:   0.35 ( 1%) usr   0.01 ( 7%) sys   0.36 ( 1%)
> wall2709 kB ( 2%) ggc
>  integrated RA   :   2.27 ( 4%) usr   0.00 ( 0%) sys   2.31 ( 4%)
> wall6634 kB ( 4%) ggc
>  LRA hard reg assignment :   4.39 ( 7%) usr   0.01 ( 7%) sys   4.41 ( 7%)
> wall   0 kB ( 0%) ggc
> 
> The alias statement walking is a bit surprising.  This is Fortran code after
> all, I wouldn't expect a lot of aliasing, I guess it's just a lot of calls
> into the alias statement walking code (but I haven't looked to confirm that
> theory).

If there were a lot of aliasing it were faster ;)  We spend the time
disambiguating (with success).  Alias stmt walking can be attributed to
FRE, PRE, DCE, DSE and some IPA code.  All but the IPA use is throttled
(but that doesn't mean it can use quite some time in some cases).

I have a local modification to how timevars are accounted (accounting nested
sub-systems to individual passes as well, so overall sum doesn't add up to
100% but sth larger).  That, with an unoptimized compiler and -fno-checking
turns up

 alias stmt walking  :  50.53 (68%) usr   0.06 (46%) sys  50.45 (68%) wall 
 2 kB ( 0%) ggc
 tree PRE:   3.40 ( 5%) usr   0.02 (15%) sys   3.42 ( 5%) wall 
  3579 kB ( 2%) ggc
 tree FRE:  48.79 (65%) usr   0.05 (38%) sys  48.79 (65%) wall 
   364 kB ( 0%) ggc
 tree DSE:   1.89 ( 3%) usr   0.00 ( 0%) sys   1.89 ( 3%) wall 
 0 kB ( 0%) ggc

so it's FRE to blame (surprisingly PRE which runs ontop of the FRE engine
is way down here).  I will investigate a bit.

> I think the RA/LRA times are probably worth some investigation as well once
> we get a handle on what's causing alias stmt walking to go nuts.

[Bug c/69760] [4.9/5/6 Regression] Wrong 64-bit memory address caused by an unneeded overflowing 32-bit integer multiplication on x86_64 under -O2 and -O3 code optimization

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69760

Jakub Jelinek  changed:

   What|Removed |Added

 CC||amker at gcc dot gnu.org
   Target Milestone|--- |4.9.4
Summary|Wrong 64-bit memory address |[4.9/5/6 Regression] Wrong
   |caused by an unneeded   |64-bit memory address
   |overflowing 32-bit integer  |caused by an unneeded
   |multiplication on x86_64|overflowing 32-bit integer
   |under -O2 and -O3 code  |multiplication on x86_64
   |optimization|under -O2 and -O3 code
   ||optimization

--- Comment #3 from Jakub Jelinek  ---
Seems this stopped working at -O2 somewhere in between r127688 and r127750.

[Bug rtl-optimization/63577] [4.9/5 Regression]: Huge compile time and memory usage with -O and not -fPIC

2016-02-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63577

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
  Known to work||6.0
 Resolution|--- |FIXED

--- Comment #17 from Richard Biener  ---
Agreed though the underlying issue in combine didn't get fixed (so we're just
waiting for a new testcase to pop up).

[Bug middle-end/47344] [4.9/5/6 Regression][meta-bug] GCC gets slower and uses more memory

2016-02-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47344
Bug 47344 depends on bug 63577, which changed state.

Bug 63577 Summary: [4.9/5 Regression]: Huge compile time and memory usage with 
-O and not -fPIC
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63577

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

[Bug target/69747] c6x cross-compiler fails with "Error: inconsistent uses of .cfi_sections"

2016-02-11 Thread dhowells at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69747

--- Comment #5 from dhowells at redhat dot com  ---
The consistency check in the binutils source code:

  if (cfi_sections_set && cfi_sections != sections)
as_bad (_("inconsistent uses of .cfi_sections"));

is added between 2.25 and 2.26 by commit:

commit 2f0c68f23bb3132cd5ac466ca8775c0d9e4960cd
Author: Catherine Moore 
Date:   Thu May 28 14:50:36 2015 -0700
Compact EH Support

so it looks like gcc is at fault.

[Bug preprocessor/60736] [4.9 Regression] Crash in preprocessor including stdc-predef.h when it does not exist on glibc-based systems

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60736

--- Comment #18 from Jakub Jelinek  ---
Author: jakub
Date: Thu Feb 11 09:03:34 2016
New Revision: 233318

URL: https://gcc.gnu.org/viewcvs?rev=233318&root=gcc&view=rev
Log:
Backported from mainline
2015-11-19  Jakub Jelinek  

PR preprocessor/60736
* include/cpplib.h (cpp_errno_filename): New prototype.
* errors.c (cpp_errno): Don't handle msgid "" specially, use
_(msgid) instead of msgid as argument to cpp_error.
(cpp_errno_filename): New function.
* files.c (read_file_guts): Use cpp_errno_filename instead of
cpp_errno.
(open_file_failed): Likewise.  Use file->name if file->path is NULL
in diagnostics.

Modified:
branches/gcc-4_9-branch/libcpp/ChangeLog
branches/gcc-4_9-branch/libcpp/errors.c
branches/gcc-4_9-branch/libcpp/files.c
branches/gcc-4_9-branch/libcpp/include/cpplib.h

[Bug target/67770] [4.9 Regression] i386: -fshrink-wrap can interact badly with trampolines

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67770

--- Comment #8 from Jakub Jelinek  ---
Author: jakub
Date: Thu Feb 11 09:04:19 2016
New Revision: 233319

URL: https://gcc.gnu.org/viewcvs?rev=233319&root=gcc&view=rev
Log:
Backported from mainline
2015-11-19  Jakub Jelinek  

PR target/67770
* config/i386/i386.md (simple_return): Disable if
ix86_static_chain_on_stack is true.

* gcc.target/i386/pr67770.c: New test.

Added:
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/i386/pr67770.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/config/i386/i386.md
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog

[Bug debug/66432] [4.9 Regression] libgomp.c/appendix-a/a.29.1.c -O2 -g: type mismatch between an SSA_NAME and its symbol

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66432

--- Comment #12 from Jakub Jelinek  ---
Author: jakub
Date: Thu Feb 11 09:08:03 2016
New Revision: 233320

URL: https://gcc.gnu.org/viewcvs?rev=233320&root=gcc&view=rev
Log:
Backported from mainline
2015-11-21  Jakub Jelinek  

PR debug/66432
* tree-inline.c (copy_debug_stmt): If
gimple_debug_source_bind_get_value is DECL_ORIGIN of a PARM_DECL
in decl_debug_args, don't call remap_gimple_op_r on it.

* gcc.dg/debug/pr66432.c: New test.

Added:
branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/debug/pr66432.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
branches/gcc-4_9-branch/gcc/tree-inline.c

[Bug preprocessor/57580] Repeated _Pragma message directives in macro causes problems

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57580

--- Comment #11 from Jakub Jelinek  ---
Author: jakub
Date: Thu Feb 11 09:09:00 2016
New Revision: 233321

URL: https://gcc.gnu.org/viewcvs?rev=233321&root=gcc&view=rev
Log:
Backported from mainline
2015-12-03  Jakub Jelinek  

PR preprocessor/57580
* c-ppoutput.c (print): Change printed field to bool.
(init_pp_output): Set print.printed to false instead of 0.
(scan_translation_unit): Fix up formatting.  Set print.printed
to true after printing something other than newline.
(scan_translation_unit_trad): Set print.printed to true instead of 1.
(maybe_print_line_1): Set print.printed to false instead of 0.
(print_line_1): Likewise.
(do_line_change): Set print.printed to true instead of 1.
(cb_define, dump_queued_macros, cb_include, cb_def_pragma,
dump_macro): Set print.printed to false after printing newline.

* c-c++-common/cpp/pr57580.c: New test.
* c-c++-common/gomp/pr57580.c: New test.

Added:
branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/cpp/pr57580.c
branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/gomp/pr57580.c
Modified:
branches/gcc-4_9-branch/gcc/c-family/ChangeLog
branches/gcc-4_9-branch/gcc/c-family/c-ppoutput.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog

[Bug tree-optimization/68680] [4.9 regression] On-stack VLA does not cause instrumentation with -fstack-protector

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68680

--- Comment #10 from Jakub Jelinek  ---
Author: jakub
Date: Thu Feb 11 09:09:58 2016
New Revision: 233322

URL: https://gcc.gnu.org/viewcvs?rev=233322&root=gcc&view=rev
Log:
Backported from mainline
2015-12-04  Jakub Jelinek  

PR tree-optimization/68680
* calls.c (special_function_p): Return ECF_MAY_BE_ALLOCA for
BUILT_IN_ALLOCA{,_WITH_ALIGN}.  Don't check for __builtin_alloca
by name.

* gcc.target/i386/pr68680.c: New test.

Added:
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/i386/pr68680.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/calls.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog

[Bug rtl-optimization/68376] [4.9 Regression] wrong code at -O1 and above on x86_64-linux-gnu

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68376

--- Comment #11 from Jakub Jelinek  ---
Author: jakub
Date: Thu Feb 11 09:11:58 2016
New Revision: 233323

URL: https://gcc.gnu.org/viewcvs?rev=233323&root=gcc&view=rev
Log:
Backported from mainline
2015-12-10  Jakub Jelinek  

PR rtl-optimization/68376
PR rtl-optimization/68670
* ifcvt.c (noce_try_abs): For one_cmpl allow < 0, >= 0
or > -1 conditions regardless of negate, and disallow
all other conditions.

* gcc.c-torture/execute/pr68376-2.c (f5, f6, f7, f8): New
tests.
(main): Call them.
* gcc.dg/pr68670-1.c: New test.
* gcc.dg/pr68670-2.c: New test.

2015-11-19  Jakub Jelinek  

PR rtl-optimization/68376
* ifcvt.c (noce_try_abs): Disable one_cmpl optimization if
encountering x <= 0 ? ~x : x or x > 0 ? ~x : x.

* gcc.c-torture/execute/pr68376-1.c: New test.
* gcc.c-torture/execute/pr68376-2.c: New test.

Added:
branches/gcc-4_9-branch/gcc/testsuite/gcc.c-torture/execute/pr68376-1.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.c-torture/execute/pr68376-2.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/pr68670-1.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/pr68670-2.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/ifcvt.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog

[Bug rtl-optimization/68670] [4.9 Regression] gcc.c-torture/execute/pr68376-2.c FAILs with -ftracer

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68670

--- Comment #6 from Jakub Jelinek  ---
Author: jakub
Date: Thu Feb 11 09:11:58 2016
New Revision: 233323

URL: https://gcc.gnu.org/viewcvs?rev=233323&root=gcc&view=rev
Log:
Backported from mainline
2015-12-10  Jakub Jelinek  

PR rtl-optimization/68376
PR rtl-optimization/68670
* ifcvt.c (noce_try_abs): For one_cmpl allow < 0, >= 0
or > -1 conditions regardless of negate, and disallow
all other conditions.

* gcc.c-torture/execute/pr68376-2.c (f5, f6, f7, f8): New
tests.
(main): Call them.
* gcc.dg/pr68670-1.c: New test.
* gcc.dg/pr68670-2.c: New test.

2015-11-19  Jakub Jelinek  

PR rtl-optimization/68376
* ifcvt.c (noce_try_abs): Disable one_cmpl optimization if
encountering x <= 0 ? ~x : x or x > 0 ? ~x : x.

* gcc.c-torture/execute/pr68376-1.c: New test.
* gcc.c-torture/execute/pr68376-2.c: New test.

Added:
branches/gcc-4_9-branch/gcc/testsuite/gcc.c-torture/execute/pr68376-1.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.c-torture/execute/pr68376-2.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/pr68670-1.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/pr68670-2.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/ifcvt.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog

[Bug target/69713] Invalid code of optimization in SH

2016-02-11 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69713

--- Comment #7 from Oleg Endo  ---
Author: olegendo
Date: Thu Feb 11 09:12:18 2016
New Revision: 233324

URL: https://gcc.gnu.org/viewcvs?rev=233324&root=gcc&view=rev
Log:
gcc/
PR target/69713
* config/sh/sh.md (casesi_worker_0): Add T_REG use.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/sh/sh.md

[Bug tree-optimization/69760] [4.9/5/6 Regression] Wrong 64-bit memory address caused by an unneeded overflowing 32-bit integer multiplication on x86_64 under -O2 and -O3 code optimization

2016-02-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69760

Richard Biener  changed:

   What|Removed |Added

   Keywords||wrong-code
 Status|REOPENED|NEW
  Component|c   |tree-optimization

--- Comment #4 from Richard Biener  ---
It's still true that L*k is still an int multiplication and if that overflows
the behavior is undefined.

In .original you can see

  if (k >= 0 && k < n)
{
  *(a + (sizetype) ((long unsigned int) (L * k) * 8)) = 0.0;
}

which means the FE only makes sure to carry out the multiplication by the
element size in sizetype, the index multiplication is done as written.

-fno-strict-overflow or -fwrapv fix the bug.

ubsan instruments like

  if (_12 != 0)
goto ;
  else
goto ;

  :
  _14 = UBSAN_CHECK_MUL (L_13(D), k_8);
  _15 = (long unsigned int) _14;
  _16 = _15 * 8;
  _18 = a_17(D) + _16;

so it seems it should catch overflow there (and it doesn't overflow here).

IVOPTs OTOH rewrites the IV to sth with initial value computed as

 a + ((sizetype)(L * -m) * 8)

We increment that IV by (sizetype)L * 8.

That's bogus as L * -m might overflow in int.

Now the question is how it arrives at this initial value.

[Bug target/69015] ICE: RTL check: expected code 'code_label', have 'return' in find_cond_trap, at ifcvt.c:3715 with -fno-if-conversion and __builtin_trap()

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69015

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Thu Feb 11 09:12:52 2016
New Revision: 233325

URL: https://gcc.gnu.org/viewcvs?rev=233325&root=gcc&view=rev
Log:
Backported from mainline
2016-01-01  Jakub Jelinek  

PR target/69015
* ifcvt.c (find_cond_trap): Give up if returnjump_p (jump).

* gcc.dg/pr69015.c: New test.

Added:
branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/pr69015.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/ifcvt.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog

[Bug c/68960] __attribute__ ((aligned ())) is ignored for OpenMP private variables

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68960

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Thu Feb 11 09:13:42 2016
New Revision: 233327

URL: https://gcc.gnu.org/viewcvs?rev=233327&root=gcc&view=rev
Log:
Backported from mainline
2016-01-07  Jakub Jelinek  

PR middle-end/68960
* gimple-expr.c (copy_var_decl): If var has DECL_USER_ALIGN set, copy
it and DECL_ALIGN too.

* testsuite/libgomp.c/pr68960.c: New test.

Added:
branches/gcc-4_9-branch/libgomp/testsuite/libgomp.c/pr68960.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/gimple-expr.c
branches/gcc-4_9-branch/libgomp/ChangeLog

[Bug plugins/69758] [6 Regression] Plugins can't include params.h (missing params.list)

2016-02-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69758

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |6.0

[Bug target/69713] Invalid code of optimization in SH

2016-02-11 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69713

--- Comment #8 from Oleg Endo  ---
Author: olegendo
Date: Thu Feb 11 09:13:23 2016
New Revision: 233326

URL: https://gcc.gnu.org/viewcvs?rev=233326&root=gcc&view=rev
Log:
gcc/
Backport from mainline
2016-02-11  Oleg Endo  

PR target/69713
* config/sh/sh.md (casesi_worker_0): Add T_REG use.

Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/config/sh/sh.md

[Bug fortran/69128] [4.9 Regression] OpenMP workshare problem with SUM()

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69128

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Thu Feb 11 09:14:43 2016
New Revision: 233328

URL: https://gcc.gnu.org/viewcvs?rev=233328&root=gcc&view=rev
Log:
Backported from mainline
2016-01-08  Jakub Jelinek  

PR fortran/69128
* trans.h (OMPWS_SCALARIZER_BODY): Define.
(OMPWS_NOWAIT): Renumber.
* trans-stmt.c (gfc_trans_where_3): Only set OMPWS_SCALARIZER_WS
if OMPWS_SCALARIZER_BODY is not set already, and set also
OMPWS_SCALARIZER_BODY until the final loop creation.
* trans-expr.c (gfc_trans_assignment_1): Likewise.
* trans-openmp.c (gfc_trans_omp_workshare): Also clear
OMPWS_SCALARIZER_BODY.
* trans-array.c (gfc_trans_scalarized_loop_end): Don't create
OMP_FOR if OMPWS_SCALARIZER_BODY is set.

* gfortran.dg/gomp/pr69128.f90: New test.

Added:
branches/gcc-4_9-branch/gcc/testsuite/gfortran.dg/gomp/pr69128.f90
Modified:
branches/gcc-4_9-branch/gcc/fortran/ChangeLog
branches/gcc-4_9-branch/gcc/fortran/trans-array.c
branches/gcc-4_9-branch/gcc/fortran/trans-expr.c
branches/gcc-4_9-branch/gcc/fortran/trans-openmp.c
branches/gcc-4_9-branch/gcc/fortran/trans-stmt.c
branches/gcc-4_9-branch/gcc/fortran/trans.h
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog

[Bug target/69713] Invalid code of optimization in SH

2016-02-11 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69713

--- Comment #9 from Oleg Endo  ---
Author: olegendo
Date: Thu Feb 11 09:15:26 2016
New Revision: 233329

URL: https://gcc.gnu.org/viewcvs?rev=233329&root=gcc&view=rev
Log:
gcc/
Backport from mainline
2016-02-11  Oleg Endo  

PR target/69713
* config/sh/sh.md (casesi_worker_0): Add T_REG use.

Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/config/sh/sh.md

[Bug rtl-optimization/69764] New: ICE on x86_64-linux-gnu at -O0 (in decompose, at rtl.h:2107)

2016-02-11 Thread chengniansun at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69764

Bug ID: 69764
   Summary: ICE on x86_64-linux-gnu at -O0 (in decompose, at
rtl.h:2107)
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: chengniansun at gmail dot com
  Target Milestone: ---

The following code crashes the trunk in both 32-bit and 64-bit modes. gcc-5.1
is fine with the code. 


$: gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap : (reconfigured)
../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap : (reconfigured)
../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 6.0.0 20160211 (experimental) [trunk revision 233315] (GCC) 
$: gcc-trunk -w small.c
small.c: In function ‘fn1’:
small.c:1:29: internal compiler error: in decompose, at rtl.h:2107
 void fn1() { unsigned short a = a >> ~8; }
 ^
0x8274ea wi::int_traits >::decompose(long*,
unsigned int, std::pair const&)
../../gcc-source-trunk/gcc/rtl.h:2105
0x8274ea wide_int_ref_storage >
../../gcc-source-trunk/gcc/wide-int.h:936
0x8274ea generic_wide_int >
../../gcc-source-trunk/gcc/wide-int.h:714
0x8274ea convert_modes(machine_mode, machine_mode, rtx_def*, int)
../../gcc-source-trunk/gcc/expr.c:697
0xa5897c expand_binop_directly
../../gcc-source-trunk/gcc/optabs.c:1026
0xa56785 expand_binop(machine_mode, optab_tag, rtx_def*, rtx_def*, rtx_def*,
int, optab_methods)
../../gcc-source-trunk/gcc/optabs.c:1133
0x80c9e4 expand_shift_1
../../gcc-source-trunk/gcc/expmed.c:2458
0x834473 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
../../gcc-source-trunk/gcc/expr.c:9029
0x71e741 expand_gimple_stmt_1
../../gcc-source-trunk/gcc/cfgexpand.c:3642
0x71e741 expand_gimple_stmt
../../gcc-source-trunk/gcc/cfgexpand.c:3702
0x72098a expand_gimple_basic_block
../../gcc-source-trunk/gcc/cfgexpand.c:5708
0x726056 execute
../../gcc-source-trunk/gcc/cfgexpand.c:6323
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
$: cat small.c
void fn1() { unsigned short a = a >> ~8; }

[Bug tree-optimization/69214] [4.9 Regression] ICE (segfault) at -Os on x86_64-linux-gnu in "fail_abnormal_edge_coalesce"

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69214

--- Comment #10 from Jakub Jelinek  ---
Author: jakub
Date: Thu Feb 11 09:22:21 2016
New Revision: 20

URL: https://gcc.gnu.org/viewcvs?rev=20&root=gcc&view=rev
Log:
Backported from mainline
2016-01-11  Jakub Jelinek  

PR tree-optimization/69214
* tree-vrp.c (simplify_cond_using_ranges): Don't propagate
innerop into a comparison if SSA_NAME_OCCURS_IN_ABNORMAL_PHI.
Formatting fix.

* gcc.c-torture/compile/pr69214.c: New test.

Added:
branches/gcc-4_9-branch/gcc/testsuite/gcc.c-torture/compile/pr69214.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
branches/gcc-4_9-branch/gcc/tree-vrp.c

[Bug rtl-optimization/68955] [6 Regression] wrong code at -O3 on x86-64-linux-gnu in 32-bit mode

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68955

--- Comment #14 from Jakub Jelinek  ---
Author: jakub
Date: Thu Feb 11 09:23:06 2016
New Revision: 21

URL: https://gcc.gnu.org/viewcvs?rev=21&root=gcc&view=rev
Log:
Backported from mainline
2016-01-19  Jakub Jelinek  

PR rtl-optimization/68955
PR rtl-optimization/64557
* dse.c (record_store, check_mem_read_rtx): Don't call get_addr
here.  Fix up formatting.
* alias.c (get_addr): Handle VALUE +/- CONST_SCALAR_INT_P.

* gcc.dg/torture/pr68955.c: New test.

Added:
branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/torture/pr68955.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/alias.c
branches/gcc-4_9-branch/gcc/dse.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog

[Bug rtl-optimization/64557] get_addr in true_dependence_1 cannot handle VALUE inside an expr

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64557

--- Comment #10 from Jakub Jelinek  ---
Author: jakub
Date: Thu Feb 11 09:23:06 2016
New Revision: 21

URL: https://gcc.gnu.org/viewcvs?rev=21&root=gcc&view=rev
Log:
Backported from mainline
2016-01-19  Jakub Jelinek  

PR rtl-optimization/68955
PR rtl-optimization/64557
* dse.c (record_store, check_mem_read_rtx): Don't call get_addr
here.  Fix up formatting.
* alias.c (get_addr): Handle VALUE +/- CONST_SCALAR_INT_P.

* gcc.dg/torture/pr68955.c: New test.

Added:
branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/torture/pr68955.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/alias.c
branches/gcc-4_9-branch/gcc/dse.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog

[Bug middle-end/69729] [6 regression] [CHKP] internal compiler error: Segmentation fault

2016-02-11 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69729

--- Comment #3 from Ilya Enkovich  ---
(In reply to Jan Hubicka from comment #2)
> Yes, the patch is meant to disbale streaming of instrumentation thunks, so
> we do not output two function bodies for one assembler name into LTO files.
> Can we possibly just fix the conditional instead of fully reverting the
> patch?

Instrumentation thunks have no body, we call release_body for all of them.

[Bug middle-end/67653] [4.9 Regression] ICE on valid code on x86_64-linux-gnu: verify_gimple failed

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67653

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Thu Feb 11 09:23:58 2016
New Revision: 22

URL: https://gcc.gnu.org/viewcvs?rev=22&root=gcc&view=rev
Log:
Backported from mainline
2016-01-21  Jakub Jelinek  

PR middle-end/67653
* gimplify.c (gimplify_asm_expr): Warn if it is too late to
attempt to mark memory input operand addressable and
call prepare_gimple_addressable in that case.  Don't adjust
input_location for diagnostics, use error_at instead.

* c-c++-common/pr67653.c: New test.
* gcc.dg/torture/pr29119.c: Add dg-warning.

Added:
branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/pr67653.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/gimplify.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/torture/pr29119.c

[Bug other/69432] [4.9 Regression] ICE in connect_traces, at dwarf2cfi.c with -O3 -m32 -minline-stringops-dynamically

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69432

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Thu Feb 11 09:26:31 2016
New Revision: 24

URL: https://gcc.gnu.org/viewcvs?rev=24&root=gcc&view=rev
Log:
Backported from mainline
2016-01-22  Jakub Jelinek  

PR target/69432
* config/i386/i386.c (expand_small_movmem_or_setmem,
expand_set_or_movmem_prologue_epilogue_by_misaligned_moves): Spelling
fixes.
(ix86_expand_set_or_movmem): Call do_pending_stack_adjust () early
if dynamic_check != -1.

* g++.dg/opt/pr69432.C: New test.

Added:
branches/gcc-4_9-branch/gcc/testsuite/g++.dg/opt/pr69432.C
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/config/i386/i386.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog

[Bug pch/68176] [4.9 Regression] all pch tests fail on eglibc systems (with bits/predefs.h)

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68176

--- Comment #16 from Jakub Jelinek  ---
Author: jakub
Date: Thu Feb 11 09:27:07 2016
New Revision: 25

URL: https://gcc.gnu.org/viewcvs?rev=25&root=gcc&view=rev
Log:
Backported from mainline
2016-01-28  Jakub Jelinek  

PR pch/68176
* files.c (_cpp_find_file): Set file->implicit_preinclude even if
included from file->implicit_preinclude header.

Modified:
branches/gcc-4_9-branch/libcpp/ChangeLog
branches/gcc-4_9-branch/libcpp/files.c

[Bug c++/59627] ICE with OpenMP "declare reduction" and -flto

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59627

--- Comment #12 from Jakub Jelinek  ---
Author: jakub
Date: Thu Feb 11 09:28:23 2016
New Revision: 26

URL: https://gcc.gnu.org/viewcvs?rev=26&root=gcc&view=rev
Log:
Backported from mainline
2016-02-08  Jakub Jelinek  

PR c++/59627
* parser.c (cp_parser_omp_declare_reduction): Set assembler name
of the DECL_OMP_DECLARE_REDUCTION_P decls.

* g++.dg/gomp/pr59627.C: New test.

Added:
branches/gcc-4_9-branch/gcc/testsuite/g++.dg/gomp/pr59627.C
Modified:
branches/gcc-4_9-branch/gcc/cp/ChangeLog
branches/gcc-4_9-branch/gcc/cp/parser.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog

[Bug c/69759] __builtin_alloca undocumented

2016-02-11 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69759

--- Comment #3 from Andreas Schwab  ---
The manpage says, "On many systems alloca() cannot be used inside the list of
arguments of a function call", so your function bar is not portable.

[Bug preprocessor/60736] [4.9 Regression] Crash in preprocessor including stdc-predef.h when it does not exist on glibc-based systems

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60736

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #19 from Jakub Jelinek  ---
Fixed.

[Bug debug/66432] [4.9 Regression] libgomp.c/appendix-a/a.29.1.c -O2 -g: type mismatch between an SSA_NAME and its symbol

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66432

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #13 from Jakub Jelinek  ---
Fixed.

[Bug target/67770] [4.9 Regression] i386: -fshrink-wrap can interact badly with trampolines

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67770

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #9 from Jakub Jelinek  ---
Fixed.

[Bug rtl-optimization/69764] [5/6 Regression] ICE on x86_64-linux-gnu at -O0 (in decompose, at rtl.h:2107)

2016-02-11 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69764

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-02-11
 CC||ktkachov at gcc dot gnu.org
  Known to work||4.9.4
   Target Milestone|--- |5.4
Summary|ICE on x86_64-linux-gnu at  |[5/6 Regression] ICE on
   |-O0 (in decompose, at   |x86_64-linux-gnu at -O0 (in
   |rtl.h:2107) |decompose, at rtl.h:2107)
 Ever confirmed|0   |1
  Known to fail||5.3.1, 6.0

--- Comment #1 from ktkachov at gcc dot gnu.org ---
Confirmed on arm and aarch64 as well and on 5.3.1

[Bug preprocessor/57580] Repeated _Pragma message directives in macro causes problems

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57580

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #12 from Jakub Jelinek  ---
Fixed.

[Bug tree-optimization/68680] [4.9 regression] On-stack VLA does not cause instrumentation with -fstack-protector

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68680

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from Jakub Jelinek  ---
Fixed.

[Bug rtl-optimization/68376] [4.9 Regression] wrong code at -O1 and above on x86_64-linux-gnu

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68376

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #12 from Jakub Jelinek  ---
Fixed.

[Bug target/69713] Invalid code of optimization in SH

2016-02-11 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69713

Oleg Endo  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #10 from Oleg Endo  ---
Fixed on trunk, GCC 5 and GCC 4.9.

[Bug target/69015] ICE: RTL check: expected code 'code_label', have 'return' in find_cond_trap, at ifcvt.c:3715 with -fno-if-conversion and __builtin_trap()

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69015

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Jakub Jelinek  ---
Fixed.

[Bug rtl-optimization/68670] [4.9 Regression] gcc.c-torture/execute/pr68376-2.c FAILs with -ftracer

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68670

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Jakub Jelinek  ---
Fixed.

[Bug fortran/69128] [4.9 Regression] OpenMP workshare problem with SUM()

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69128

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Jakub Jelinek  ---
Fixed.

[Bug c/68960] __attribute__ ((aligned ())) is ignored for OpenMP private variables

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68960

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Jakub Jelinek  ---
Fixed.

[Bug tree-optimization/69214] [4.9 Regression] ICE (segfault) at -Os on x86_64-linux-gnu in "fail_abnormal_edge_coalesce"

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69214

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from Jakub Jelinek  ---
Fixed.

[Bug middle-end/67653] [4.9 Regression] ICE on valid code on x86_64-linux-gnu: verify_gimple failed

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67653

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Jakub Jelinek  ---
Fixed.

[Bug other/69432] [4.9 Regression] ICE in connect_traces, at dwarf2cfi.c with -O3 -m32 -minline-stringops-dynamically

2016-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69432

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Jakub Jelinek  ---
Fixed.

  1   2   >