[Bug target/81228] [7/8 Regression] ICE in gen_vec_cmpv2dfv2di, at config/aarch64/aarch64-simd.md:2508

2017-06-27 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81228

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-06-28
 CC||amker at gcc dot gnu.org
   Target Milestone|--- |7.2
Summary|ICE in gen_vec_cmpv2dfv2di, |[7/8 Regression] ICE in
   |at  |gen_vec_cmpv2dfv2di, at
   |config/aarch64/aarch64-simd |config/aarch64/aarch64-simd
   |.md:2508|.md:2508
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
LTGT is not in that switch for some reason.

The definition:
/* This is an ordered NE, ie !UNEQ, ie false for NaN.  */
DEF_RTL_EXPR(LTGT, "ltgt", "ee", RTX_COMM_COMPARE)

The pattern was introduced with:
https://gcc.gnu.org/viewcvs/gcc?view=revision=239327

[Bug c++/81229] [8 Regression] ICE in c_tree_chain_next on aarch64

2017-06-27 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81229

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||GC, ice-on-valid-code
  Component|target  |c++
Version|7.0 |8.0
   Target Milestone|--- |8.0
Summary|ICE in c_tree_chain_next on |[8 Regression] ICE in
   |aarch64 |c_tree_chain_next on
   ||aarch64

[Bug fortran/53029] missed optimization in internal read (without implied-do-loop)

2017-06-27 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53029

Jerry DeLisle  changed:

   What|Removed |Added

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

--- Comment #11 from Jerry DeLisle  ---
Fixed on 7 and closing.

[Bug fortran/53029] missed optimization in internal read (without implied-do-loop)

2017-06-27 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53029

--- Comment #10 from Jerry DeLisle  ---
Author: jvdelisle
Date: Wed Jun 28 04:14:32 2017
New Revision: 249719

URL: https://gcc.gnu.org/viewcvs?rev=249719=gcc=rev
Log:
2017-06-27  Jerry DeLisle  

Backport from trunk
PR libgfortran/53029
* io/list_read.c(list_formatted_read_scalar: Set the err return
value to the common.flags error values.

* gfortran.dg/read_5.f90: New test.

Added:
branches/gcc-7-branch/gcc/testsuite/gfortran.dg/read_5.f90
Modified:
branches/gcc-7-branch/gcc/testsuite/ChangeLog
branches/gcc-7-branch/libgfortran/ChangeLog
branches/gcc-7-branch/libgfortran/io/list_read.c

[Bug c++/55639] Partial nested template specialization leads to segmentation fault of g++

2017-06-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55639

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-06-28
 CC||jason at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
 Ever confirmed|0   |1

[Bug fortran/80164] ICE in gfc_format_decoder at gcc/fortran/error.c:933

2017-06-27 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80164

--- Comment #12 from Jerry DeLisle  ---
Fixed on trunk, will backport to 7 in a few days.

[Bug fortran/80164] ICE in gfc_format_decoder at gcc/fortran/error.c:933

2017-06-27 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80164

--- Comment #11 from Jerry DeLisle  ---
Author: jvdelisle
Date: Wed Jun 28 02:17:40 2017
New Revision: 249718

URL: https://gcc.gnu.org/viewcvs?rev=249718=gcc=rev
Log:
2017-06-27  Jerry DeLisle  

PR fortran/80164
* trans-stmt.c (gfc_trans_call): If no code expr, use code->loc
as warning/error locus.

* gfortran.dg/array_temporaries_4.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/array_temporaries_4.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/54769] [Core/1111] dependent class method template not found if structure template with the same name is visible

2017-06-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54769

Jason Merrill  changed:

   What|Removed |Added

 CC||felix at fontein dot de

--- Comment #4 from Jason Merrill  ---
*** Bug 61642 has been marked as a duplicate of this bug. ***

[Bug c++/55576] Fails to compile a call to template member function

2017-06-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55576

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #16 from Jason Merrill  ---
.

*** This bug has been marked as a duplicate of bug 54769 ***

[Bug c++/54769] [Core/1111] dependent class method template not found if structure template with the same name is visible

2017-06-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54769

Jason Merrill  changed:

   What|Removed |Added

 CC||antoshkka at gmail dot com

--- Comment #3 from Jason Merrill  ---
*** Bug 55576 has been marked as a duplicate of this bug. ***

[Bug c++/61642] g++ confuses template member template function with template class

2017-06-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61642

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #4 from Jason Merrill  ---
.

*** This bug has been marked as a duplicate of bug 54769 ***

[Bug c++/61022] [C++11] Bogus "error: parameter packs not expanded with '...'"

2017-06-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61022

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||jason at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org

[Bug c++/61022] [C++11] Bogus "error: parameter packs not expanded with '...'"

2017-06-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61022

Jason Merrill  changed:

   What|Removed |Added

 CC||realloc at outlook dot de

--- Comment #3 from Jason Merrill  ---
*** Bug 69111 has been marked as a duplicate of this bug. ***

[Bug c++/69111] Problem with expansion of a parameter pack of templates

2017-06-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69111

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #3 from Jason Merrill  ---
Dup.

*** This bug has been marked as a duplicate of bug 61022 ***

[Bug c++/61642] g++ confuses template member template function with template class

2017-06-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61642

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||jason at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org

[Bug c++/61642] g++ confuses template member template function with template class

2017-06-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61642

Jason Merrill  changed:

   What|Removed |Added

 CC||Casey at Carter dot net

--- Comment #3 from Jason Merrill  ---
*** Bug 81026 has been marked as a duplicate of this bug. ***

[Bug c++/81026] Lookup of dependent member template incorrectly finds non-member

2017-06-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81026

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Jason Merrill  ---
Dup.

*** This bug has been marked as a duplicate of bug 61642 ***

[Bug c++/69111] Problem with expansion of a parameter pack of templates

2017-06-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69111

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||jason at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org

[Bug fortran/81160] arith.c:2009: bad statement order ?

2017-06-27 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81160

Jerry DeLisle  changed:

   What|Removed |Added

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

--- Comment #4 from Jerry DeLisle  ---
Closing

[Bug fortran/80164] ICE in gfc_format_decoder at gcc/fortran/error.c:933

2017-06-27 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80164

Jerry DeLisle  changed:

   What|Removed |Added

 Status|WAITING |ASSIGNED

--- Comment #10 from Jerry DeLisle  ---
(In reply to Jerry DeLisle from comment #9)
> Martin or Dominique, in looking at this I am unable to reproduce any
> failures. Was this for a specific platform? Mac, PowerPC ?

Disregard, I see it with -Warray-temporaries. It was not obvious to me at
first.

[Bug fortran/80164] ICE in gfc_format_decoder at gcc/fortran/error.c:933

2017-06-27 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80164

--- Comment #9 from Jerry DeLisle  ---
Martin or Dominique, in looking at this I am unable to reproduce any failures.
Was this for a specific platform? Mac, PowerPC ?

[Bug tree-optimization/81192] [8 Regression] gcc ICE at -Os on x86_64-linux-gnu: Segmentation fault

2017-06-27 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81192

--- Comment #5 from Tom de Vries  ---
There actually is some code in find_same_succ_bb to keep loop structure:
...
  if (bb == NULL
  /* Be conservative with loop structure.  It's not evident that this test  
 is sufficient.  Before tail-merge, we've just called   
 loop_optimizer_finalize, and LOOPS_MAY_HAVE_MULTIPLE_LATCHES is now
 set, so there's no guarantee that the loop->latch value is still
valid.  
 But we assume that, since we've forced LOOPS_HAVE_SIMPLE_LATCHES at
the  
 start of pre, we've kept that property intact throughout pre, and are  
 keeping it throughout tail-merge using this test.  */
  || bb->loop_father->latch == bb)
return;
...

For this example, the cleanup_tree_cfg in tail_merge_optimize creates multiple
loop latches in the inner loop, so the loop->latch value is no longer valid.
This test needs fixing.

[Bug c++/81239] New: std::__cxx11::string& visible in gcc warning output

2017-06-27 Thread jg at jguk dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81239

Bug ID: 81239
   Summary: std::__cxx11::string& visible in gcc warning output
   Product: gcc
   Version: 5.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jg at jguk dot org
  Target Milestone: ---

Created attachment 41643
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41643=edit
Example

Hello

Can G++ just not say __cxx11 in warning example main.cpp:18:17 below ?

I noticed that with, or without -std=c++11 on gcc params, the output of
std::string for references still shows __cxx11. for const ref, it isn't shown
in the warning.  

The later warning is ok main.cpp:10:6

Warnings:

$ g++ -Wall -o main main.cpp
main.cpp: In function ‘int main()’:
main.cpp:18:17: error: too few arguments to function ‘void test_params(const
string&, std::__cxx11::string&)’
 test_params();
 ^
main.cpp:10:6: note: declared here
 void test_params(const string & mystr1, string & out_str)
  ^



Expected:

main.cpp:18:17: error: too few arguments to function ‘void test_params(const
string&, string&)’
 test_params();

[Bug c/81235] Realloc returns NULL while it should not

2017-06-27 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81235

--- Comment #2 from Jonathan Wakely  ---
(In reply to Carl Johnson from comment #0)
> After debugging, I noticed that the crash is because function `realloc`
> returned NULL. As I know, there might be two situations when `realloc`
> returns NULL:
> 1. When a pointer is passed which didn't came from `alloc` or `calloc`

That's not guaranteed. Passing such a pointer is undefined, so anything can
happen.

Your code is full of bugs, compiling with -fsanitize=undefined reveals runtime
errors due to misaligned accesses, and -fsanitize=address reveals a heap buffer
overflow, which is almost certainly the cause of your problem:

=
==915==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6030ec40
at pc 0x00402f42 bp 0x7ffdd1efc220 sp 0x7ffdd1efc210
WRITE of size 4 at 0x6030ec40 thread T0
#0 0x402f41 in qb /tmp/1.c:4
#1 0x400fe8 in main /tmp/1.c:4
#2 0x7f8fb17d2730 in __libc_start_main (/lib64/libc.so.6+0x20730)
#3 0x401258 in _start (/tmp/a.out+0x401258)

0x6030ec40 is located 0 bytes to the right of 32-byte region
[0x6030ec20,0x6030ec40)
allocated by thread T0 here:
#0 0x7f8fb1c3b220 in realloc (/lib64/libasan.so.3+0xc7220)
#1 0x402008 in bc /tmp/1.c:4

SUMMARY: AddressSanitizer: heap-buffer-overflow /tmp/1.c:4 in qb
Shadow bytes around the buggy address:
  0x0c067fff9d30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c067fff9d40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c067fff9d50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c067fff9d60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c067fff9d70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c067fff9d80: fa fa fa fa 00 00 00 00[fa]fa fd fd fd fd fa fa
  0x0c067fff9d90: fd fd fd fa fa fa fd fd fd fd fa fa fd fd fd fd
  0x0c067fff9da0: fa fa fd fd fd fd fa fa 00 00 00 00 fa fa 00 00
  0x0c067fff9db0: 00 fa fa fa 00 00 00 00 fa fa 00 00 00 fa fa fa
  0x0c067fff9dc0: fd fd fd fd fa fa fd fd fd fd fa fa fd fd fd fa
  0x0c067fff9dd0: fa fa fd fd fd fa fa fa 00 00 00 fa fa fa fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:   00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:   fa
  Heap right redzone:  fb
  Freed heap region:   fd
  Stack left redzone:  f1
  Stack mid redzone:   f2
  Stack right redzone: f3
  Stack partial redzone:   f4
  Stack after return:  f5
  Stack use after scope:   f8
  Global redzone:  f9
  Global init order:   f6
  Poisoned by user:f7
  Container overflow:  fc
  Array cookie:ac
  Intra object redzone:bb
  ASan internal:   fe
  Left alloca redzone: ca
  Right alloca redzone:cb
==915==ABORTING

[Bug c++/81204] [7/8 Regression] Rejects boost headers

2017-06-27 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81204

--- Comment #4 from Jonathan Wakely  ---
dup of PR 81026?

[Bug c/81235] Realloc returns NULL while it should not

2017-06-27 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81235

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #1 from Andrew Pinski  ---
realloc is not under GCC control.  That is GCC does not provide the libc where
realloc is implemented.

Please report this to where your libc is from.  I suspect either cygwin or
mingw.  But saying that can you double check to make sure you are not writing
past the memory allocation because if you are then realloc could possibility to
return NULL.

[Bug c++/81237] Cannot link when class methods compiled with different levels of vectorization

2017-06-27 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81237

--- Comment #3 from Andrew Pinski  ---
Hmm, you are compiling the files with different levels of ABI.
-fabi-version=6 is specified in test.o but not test2.o .

Can you try with the same abi version and try again?

[Bug target/81193] PowerPC GCC __builtin_cpu_is and __builtin_cpu_supports should warn about old libraries

2017-06-27 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81193

--- Comment #10 from Michael Meissner  ---
Created attachment 41642
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41642=edit
Patch to add ppc_cpu_supports_hw target support for tests

BTW, the patch attached allows us to check whether __builtin_cpu_supports works
on power7 and newer systems.

[Bug target/81193] PowerPC GCC __builtin_cpu_is and __builtin_cpu_supports should warn about old libraries

2017-06-27 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81193

--- Comment #9 from Michael Meissner  ---
Well in theory we could add yet another switch to enable/disable the warning,
but we have too many switches as it is.

Note, I've put a warning in my development version of the target_clones
patches, and I think I will keep it (my warning is only if you try to use
target_clones on an old system).

We probably should update the gcc documentation to mention this restriction.

Most users won't be able to use __builtin_cpu_ until their distro updates
to a new glibc (i.e. years).  The Advance Toolchain users will be to use it.

[Bug ipa/81238] Target clone support does not make default clone static.

2017-06-27 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81238

--- Comment #1 from Michael Meissner  ---
Created attachment 41641
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41641=edit
Proposed patch to fix the problem

[Bug target/80382] ICE with error: unrecognizable insn

2017-06-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80382

--- Comment #15 from Segher Boessenkool  ---
Author: segher
Date: Tue Jun 27 21:45:45 2017
New Revision: 249711

URL: https://gcc.gnu.org/viewcvs?rev=249711=gcc=rev
Log:
Those two changes aren't actually applicable to 5.  Sorry for the noise.


Revert:
Backports from trunk:

2017-04-12  Segher Boessenkool  
PR target/80382
* config/rs6000/sync.md (atomic_load, atomic_store
PR target/80966
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
gen_add3_insn did not fail.
* config/rs6000/rs6000.md (add3): If asked to add a constant to
r0, construct that number in a temporary reg and add that reg to r0.
If asked to put the result in r0 as well, fail.


Revert:
Backport from trunk:

2017-06-09  Segher Boessenkool  
PR target/80966
* gcc.target/powerpc/stack-limit.c: New testcase.

Removed:
branches/gcc-5-branch/gcc/testsuite/gcc.target/powerpc/stack-limit.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/config/rs6000/rs6000.c
branches/gcc-5-branch/gcc/config/rs6000/rs6000.md
branches/gcc-5-branch/gcc/config/rs6000/sync.md
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug target/80966] ICE with -fstack-limit-register and large frames

2017-06-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80966

--- Comment #5 from Segher Boessenkool  ---
Author: segher
Date: Tue Jun 27 21:45:45 2017
New Revision: 249711

URL: https://gcc.gnu.org/viewcvs?rev=249711=gcc=rev
Log:
Those two changes aren't actually applicable to 5.  Sorry for the noise.


Revert:
Backports from trunk:

2017-04-12  Segher Boessenkool  
PR target/80382
* config/rs6000/sync.md (atomic_load, atomic_store
PR target/80966
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
gen_add3_insn did not fail.
* config/rs6000/rs6000.md (add3): If asked to add a constant to
r0, construct that number in a temporary reg and add that reg to r0.
If asked to put the result in r0 as well, fail.


Revert:
Backport from trunk:

2017-06-09  Segher Boessenkool  
PR target/80966
* gcc.target/powerpc/stack-limit.c: New testcase.

Removed:
branches/gcc-5-branch/gcc/testsuite/gcc.target/powerpc/stack-limit.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/config/rs6000/rs6000.c
branches/gcc-5-branch/gcc/config/rs6000/rs6000.md
branches/gcc-5-branch/gcc/config/rs6000/sync.md
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug c++/69300] g++ segfault on silly noexcept case

2017-06-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69300

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||jason at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org

[Bug c++/81237] Cannot link when class methods compiled with different levels of vectorization

2017-06-27 Thread ravi.kappiy...@cd-adapco.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81237

--- Comment #2 from Ravi  ---
I noticed I neglected to mention the error message. Compiling the code with GNU
7.1 gives me the error:

test.o:(.data.rel.ro._ZTV1C[_ZTV1C]+0x38): undefined reference to `non-virtual
thunk to C::func() const'
collect2: error: ld returned 1 exit status

"ld -v" Returns "GNU ld (GNU Binutils) 2.24)" for both GNU 6.2 and GNU 7.1
builds.

[Bug c++/72801] ICE on invalid C++ code with ill-formed class member specialization: tree check: expected class ‘expression’, have ‘type’ (integer_type) in tree_operand_check, at tree.h:3521

2017-06-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72801

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||jason at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org

[Bug ipa/81238] Target clone support does not make default clone static.

2017-06-27 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81238

Michael Meissner  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-06-27
   Assignee|unassigned at gcc dot gnu.org  |meissner at gcc dot 
gnu.org
 Ever confirmed|0   |1

[Bug ipa/81238] New: Target clone support does not make default clone static.

2017-06-27 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81238

Bug ID: 81238
   Summary: Target clone support does not make default clone
static.
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ipa
  Assignee: unassigned at gcc dot gnu.org
  Reporter: meissner at gcc dot gnu.org
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

The default target clone created in the create_dispatcher_calls function in the
multiple_target.c file has the TREE_PUBLIC bit if the target_clone function was
public.  This function does not need to be public, since the only reference
will be in the ifunc resolver.

[Bug c++/81237] Cannot link when class methods compiled with different levels of vectorization

2017-06-27 Thread ravi.kappiy...@cd-adapco.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81237

--- Comment #1 from Ravi  ---
The markdown didn't work quite the way I thought it would... Let me know if the
format is unclear and I'll rework the initial message to make it clearer

[Bug c++/81237] New: Cannot link when class methods compiled with different levels of vectorization

2017-06-27 Thread ravi.kappiy...@cd-adapco.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81237

Bug ID: 81237
   Summary: Cannot link when class methods compiled with different
levels of vectorization
   Product: gcc
   Version: 7.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ravi.kappiy...@cd-adapco.com
  Target Milestone: ---

I have 4 files (2 CPP files, 1 header file, and 1 Makefile), shown below:

**test.h**
#ifndef test_h_
#define test_h_

#include 

class A
{
public:
  virtual ~A() {}
protected:
};
class B
{
public:
  virtual std::string const func() const = 0;
protected:
  B() {}
  virtual ~B() {}
};
class C : public A
, public B
{
public:
  ~C();
private:
  std::string const func() const;
};

#endif

**test.cpp**
#include "test.h"

C::~C() {}

**test2.cpp**
#include "test.h"

std::string const
C::func() const
{
  return 0;
}

**Makefile**
all:
${MIRROR_HOME}/compilers/linux-x86_64-2.10.1/gnu7.1.0/bin/g++ -O3
--param inline-unit-growth=1000 -fPIC -o test2.o -c test2.cpp
${MIRROR_HOME}/compilers/linux-x86_64-2.10.1/gnu7.1.0/bin/g++ -fPIC -O3
--param inline-unit-growth=1000 -shared -z defs -Wl,--as-needed -shared
-Wl,-soname,libTest2.so -o libTest2.so test2.o
${MIRROR_HOME}/compilers/linux-x86_64-2.10.1/gnu7.1.0/bin/g++ -O3
--param inline-unit-growth=1000 -fPIC -mavx512f -fabi-version=6 -o test.o -c
test.cpp
${MIRROR_HOME}/compilers/linux-x86_64-2.10.1/gnu7.1.0/bin/g++ -fPIC -O3
--param inline-unit-growth=1000 -shared -z defs -Wl,--as-needed -shared
-Wl,-soname,libTest.so -o libTest.so test.o libTest2.so

old:
${MIRROR_HOME}/compilers/linux-x86_64-2.10.1/gnu6.2.0/bin/g++ -O3
--param inline-unit-growth=1000 -fPIC -o test2.o -c test2.cpp
${MIRROR_HOME}/compilers/linux-x86_64-2.10.1/gnu6.2.0/bin/g++ -fPIC -O3
--param inline-unit-growth=1000 -shared -z defs -Wl,--as-needed -shared
-Wl,-soname,libTest2.so -o libTest2.so test2.o
${MIRROR_HOME}/compilers/linux-x86_64-2.10.1/gnu6.2.0/bin/g++ -O3
--param inline-unit-growth=1000 -fPIC -mavx512f -fabi-version=6 -o test.o -c
test.cpp
${MIRROR_HOME}/compilers/linux-x86_64-2.10.1/gnu6.2.0/bin/g++ -fPIC -O3
--param inline-unit-growth=1000 -shared -z defs -Wl,--as-needed -shared
-Wl,-soname,libTest.so -o libTest.so test.o libTest2.so

* **test2.cpp** is compiled with SSE2 instructions to create **libTest2.so**
* **test.cpp** is compiled with AVX-512 instructions (the flags "-mavx512f
-fabi-version=6" are added to it's compile)
* If both CPP files are instead compiled with the same vectorization level (via
the removal of the extra flags for **test.cpp** or the addition of the same
flags for **test2.cpp**), then the compile works as expected. 
* The linker appears to be getting confused when some of the methods in the
class are compiled with one vectorization level, while other methods are
compiled with another, causing the "undefined reference" error.
* As far as I am aware, it is not illegal via the standard to compile certain
methods of a class with one level of vectorization and not other methods - this
appears to be a compiler bug.
* When using "make old" (i.e., using GNU 6.2 instead of GNU 7.1), the compile
works as expected even when using different levels of vectorization.

[Bug rtl-optimization/81194] [8 Regression] ICE during RTL pass: expand

2017-06-27 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81194

Peter Bergner  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |bergner at gcc dot 
gnu.org

--- Comment #8 from Peter Bergner  ---
So we have a switch statement with onc case and a default case statement.  The
normal case statement contains an __builtin_unreachable() call, so we delete
the case statement, leaving us with only the default case.  We then call into
expand_case() and we have this code which has been there for a while:

  /* Get upper and lower bounds of case values.  */
  elt = gimple_switch_label (stmt, 1);

Since there is only one default case statement in stmt, asking for the label at
offset "1" is illegal and that leads to the ICE.  Either we need to protect
this code or maybe we can remove the switch statement all together.

[Bug c++/81236] Crash when calling a template member function from generic lambda

2017-06-27 Thread gufideg at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81236

--- Comment #2 from Guillaume Racicot  ---
Created attachment 41640
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41640=edit
CPP file that trigger the crash

[Bug c++/81236] Crash when calling a template member function from generic lambda

2017-06-27 Thread gufideg at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81236

--- Comment #1 from Guillaume Racicot  ---
Created attachment 41639
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41639=edit
The compiler output crashing

[Bug c++/81236] New: Crash when calling a template member function from generic lambda

2017-06-27 Thread gufideg at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81236

Bug ID: 81236
   Summary: Crash when calling a template member function from
generic lambda
   Product: gcc
   Version: 7.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gufideg at gmail dot com
  Target Milestone: ---

This causes current G++ (7.1.1) to crash:

#include 

template 
constexpr void for_sequence(std::integer_sequence, F&& f) {
using unpack_t = int[];
(void)unpack_t{(static_cast(f(std::integral_constant{})),
0)..., 0};
}

template
struct MyType {
void crash() {
   
for_sequence(std::make_index_sequence{}, [&](auto
i){
make_crash(); // Line (1)
});
}

template
void make_crash() {}
};

int main() {
MyType> test;

test.crash();
}

Commenting line marked as `(1)` makes the code compile.

This code is valid and compiles under clang (3.8.0)

[Bug c/81235] New: Realloc returns NULL while ti should not

2017-06-27 Thread carljohnson95 at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81235

Bug ID: 81235
   Summary: Realloc returns NULL while ti should not
   Product: gcc
   Version: 5.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: carljohnson95 at gmx dot com
  Target Milestone: ---

Created attachment 41638
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41638=edit
This attachment contains source file which causes the issue and log file which
contains alloc/realloc data.

system type: Windows 8.1
complete command line:
>gcc 1.c -Wall -Wextra -std=c99 -Wmissing-prototypes -Wstrict-prototypes 
>-Wold-style-definition -fno-strict-aliasing -fwrapv -o 1.exe
the compiler output: /

The source file which causes the issue is named "1.c" (in attachment). I am not
allowed to share whole code, so I renamed every single identifier and removed
extra space. It may be hard to read, but I don't have other way to share it.

The script is compiled correctly (I mean it doesn't throw any errors or
warnings). However, when executed, the process crashes. I spent a lot of time
trying to figure out what is actually causing the crash.

After debugging, I noticed that the crash is because function `realloc`
returned NULL. As I know, there might be two situations when `realloc` returns
NULL:
1. When a pointer is passed which didn't came from `alloc` or `calloc`
2. When there is no enough free space

The second possibility is not the case, because I ensured that there is enough
space. Also, I debugged it and noticed that `realloc` returns NULL when
requested size is 36 bytes.

So, the only left possibility is that I mistakenly passed bad pointer to
`realloc`. So, I wrote a function for debugging to inspect what pointers are
allocated/reallocated (you can see it in file "2.c" from attachment). I
analyzed the output log file and I didn't notice anything suspicious. Every
single time I call `realloc` I pass correct pointer. But, for some weird reason
when `36` bytes are reached, the NULL is received.

I have a lot of experience with mistakes with memory management, so I know how
to deal with that. However, this is not the case. I strongly believe this is a
bug with GCC. It usually takes me a few minutes to figure out where I made a
mistake, but this code took me a week and I still think I did everything right
and GCC messed something up.

The last thing I did is to compile it using VisualStudio. As I though, the
program works correctly and doesn't throw any error, wanrning or segfault.
In the file "log.txt" from the attachment you can see every single call of
alloc/realloc functions and its parameters and output. Maybe it helps.

Also, the crash doesn't happen every time. Approximatelly 50% of times I run
the same program it crashes.

[Bug c++/72852] constexpr inside class template cannot be recognized

2017-06-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72852

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||jason at gcc dot gnu.org
 Resolution|--- |FIXED
   Target Milestone|5.5 |6.0

--- Comment #2 from Jason Merrill  ---
(In reply to Martin Liška from comment #1)
> Confirmed, fixed on trunk (as well as on GCC-6 branch) by r233365.

Yep, closing.

[Bug c++/81026] Lookup of dependent member template incorrectly finds non-member

2017-06-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81026

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-06-27
 CC||jason at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
 Ever confirmed|0   |1

[Bug c++/81169] [8 Regression] gcc 8.0dev -Wclass-memaccess illegitimate warning related to volatile

2017-06-27 Thread dudul04 at yahoo dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81169

--- Comment #5 from Even Rouault  ---
Thanks. Fix confirmed.

[Bug c++/72764] [5/6/7/8 Regression] ICE on invalid C++11 code instantiating an alias template: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in typedef_variant_p, at tree.c:12660

2017-06-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72764

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org

[Bug c++/81234] [6 Regression] stray notes for a flexible array member not at end of struct

2017-06-27 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81234

Martin Sebor  changed:

   What|Removed |Added

   Keywords|rejects-valid   |diagnostic
  Known to work|6.3.1   |7.1.0, 8.0
Version|7.1.1   |6.3.1
Summary|[7/8 Regression] flexible   |[6 Regression] stray notes
   |array member not at end of  |for a flexible array member
   |‘struct |not at end of struct
  Known to fail|7.1.0, 8.0  |6.3.1
   Severity|normal  |minor

--- Comment #3 from Martin Sebor  ---
The C constraint is that a flexible array member must be the last member of a
struct.  In addition, such a struct may not not be used to define a member in
another struct (not even as the last member).  These constraints prevent
aliasing between such a member and those that follow.

In C, mode GCC accepts the test case from comment #0 but with -Wpedantic issues
a warning:

t.c:8:14: warning: invalid use of structure with flexible array member
[-Wpedantic]

G++ 7 is intentionally more strict here and rejects the code (the checking was
tightened up in r241143).  The stray notes in GCC 6 (without -Wpedantic) are a
6.3 regression.

To avoid the error (and accept the risks of the array aliasing with members
stored at the same address) define data as a zero-length array
(https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html).

[Bug target/81193] PowerPC GCC __builtin_cpu_is and __builtin_cpu_supports should warn about old libraries

2017-06-27 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81193

--- Comment #8 from Peter Bergner  ---
(In reply to Michael Meissner from comment #4)
> I think for the problem of using __builtin_cpu_, we should issue a 
> warning
> (not a fatal error) if the configured GLIBC is too old saying you need to link
> against a newer library, but generate the same code that we normally do.  
> Given
> there is a reference to an external provided with the new glibc, it should be
> safe, because you would get a linker error if you actually tried to use it 
> with
> an old library.  It would allow creation of libraries with functions using
> __builtin_cpu_* and target_clone with an old compiler, providing the library 
> is
> linked appropriately.

But with your patch and one being contemplated for float128-ifunc.c in libgcc,
GCC will be a user of those builtins, so if we build on a system with an old
GLIBC, we'll get a bootstrap / build failure.  We can't have that.

I'm also starting to wonder about the warning.  We cannot just always emit the
warning, because the GCC bootstrap uses -Werror, so again, we'd end up with a
bootstrap / build error.  I agree that it would be nice to tell normal users
that the builtin they're using to always going to return false, but how can we
turn it off for GCC builds?

[Bug libgomp/81108] OpenMP doacross (omp do/for ordered) performance

2017-06-27 Thread jeff.science at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81108

--- Comment #10 from Jeff Hammond  ---
Thanks for the feedback.  I agree that it is a huge amount of work to optimize
this.

For what it's worth, GCC and Clang perform about the same.  Unfortunately, I do
not have the means to evaluate IBM XLF, which may have an optimized
implementation of this
(https://rd.springer.com/chapter/10.1007%2F978-3-642-32820-6_23), so I do not
have a good sense of what is achievable here, other than what I hand-optimize.

I have no objection if you want to close this as invalid.

[Bug tree-optimization/81192] [8 Regression] gcc ICE at -Os on x86_64-linux-gnu: Segmentation fault

2017-06-27 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81192

Tom de Vries  changed:

   What|Removed |Added

 CC||vries at gcc dot gnu.org

--- Comment #4 from Tom de Vries  ---
Created attachment 41637
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41637=edit
tentative patch to stop bbs from different loop levels to merge

Fixes the sigsegv.

[Bug target/80382] ICE with error: unrecognizable insn

2017-06-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80382

--- Comment #14 from Segher Boessenkool  ---
Author: segher
Date: Tue Jun 27 18:24:51 2017
New Revision: 249707

URL: https://gcc.gnu.org/viewcvs?rev=249707=gcc=rev
Log:
Backports from trunk:

2016-08-15  Segher Boessenkool  
PR rtl-optimization/73650
* lra-constraints.c (simple_move_p): If the insn is multiple_sets
it is not a simple move.

2017-01-20  Segher Boessenkool  
PR target/61729
PR target/77850
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
read from, for big endian.

2017-04-12  Segher Boessenkool  
PR target/80382
* config/rs6000/sync.md (atomic_load, atomic_store
PR middle-end/80692
* real.c (do_compare): Give decimal_do_compare preference over
comparing just the signs.

2017-05-31  Segher Boessenkool  
PR target/80618
* config/rs6000/vector.md (*vector_uneq): Write the nor in the
splitter result in the canonical way.

2017-06-09  Segher Boessenkool  
PR target/80966
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
gen_add3_insn did not fail.
* config/rs6000/rs6000.md (add3): If asked to add a constant to
r0, construct that number in a temporary reg and add that reg to r0.
If asked to put the result in r0 as well, fail.

2017-06-23  Segher Boessenkool  
PR middle-end/80902
* builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
a call, force the call to not be a tail call.

gcc/testsuite/
Backports from trunk:

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* gcc.c-torture/execute/pr80692.c: New testcase.

2017-06-09  Segher Boessenkool  
PR target/80966
* gcc.target/powerpc/stack-limit.c: New testcase.

Added:
branches/gcc-5-branch/gcc/testsuite/gcc.c-torture/execute/pr80692.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/powerpc/stack-limit.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/builtins.c
branches/gcc-5-branch/gcc/config/rs6000/rs6000.c
branches/gcc-5-branch/gcc/config/rs6000/rs6000.md
branches/gcc-5-branch/gcc/config/rs6000/sync.md
branches/gcc-5-branch/gcc/config/rs6000/vector.md
branches/gcc-5-branch/gcc/lra-constraints.c
branches/gcc-5-branch/gcc/real.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug middle-end/80902] A problem in expand_builtin_atomic_fetch_op

2017-06-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80902

--- Comment #3 from Segher Boessenkool  ---
Author: segher
Date: Tue Jun 27 18:24:51 2017
New Revision: 249707

URL: https://gcc.gnu.org/viewcvs?rev=249707=gcc=rev
Log:
Backports from trunk:

2016-08-15  Segher Boessenkool  
PR rtl-optimization/73650
* lra-constraints.c (simple_move_p): If the insn is multiple_sets
it is not a simple move.

2017-01-20  Segher Boessenkool  
PR target/61729
PR target/77850
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
read from, for big endian.

2017-04-12  Segher Boessenkool  
PR target/80382
* config/rs6000/sync.md (atomic_load, atomic_store
PR middle-end/80692
* real.c (do_compare): Give decimal_do_compare preference over
comparing just the signs.

2017-05-31  Segher Boessenkool  
PR target/80618
* config/rs6000/vector.md (*vector_uneq): Write the nor in the
splitter result in the canonical way.

2017-06-09  Segher Boessenkool  
PR target/80966
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
gen_add3_insn did not fail.
* config/rs6000/rs6000.md (add3): If asked to add a constant to
r0, construct that number in a temporary reg and add that reg to r0.
If asked to put the result in r0 as well, fail.

2017-06-23  Segher Boessenkool  
PR middle-end/80902
* builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
a call, force the call to not be a tail call.

gcc/testsuite/
Backports from trunk:

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* gcc.c-torture/execute/pr80692.c: New testcase.

2017-06-09  Segher Boessenkool  
PR target/80966
* gcc.target/powerpc/stack-limit.c: New testcase.

Added:
branches/gcc-5-branch/gcc/testsuite/gcc.c-torture/execute/pr80692.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/powerpc/stack-limit.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/builtins.c
branches/gcc-5-branch/gcc/config/rs6000/rs6000.c
branches/gcc-5-branch/gcc/config/rs6000/rs6000.md
branches/gcc-5-branch/gcc/config/rs6000/sync.md
branches/gcc-5-branch/gcc/config/rs6000/vector.md
branches/gcc-5-branch/gcc/lra-constraints.c
branches/gcc-5-branch/gcc/real.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug target/80618] [8 regression] test case gcc.dg/pr50310-2.c fails with ICE starting with 247544

2017-06-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80618

--- Comment #11 from Segher Boessenkool  ---
Author: segher
Date: Tue Jun 27 18:24:51 2017
New Revision: 249707

URL: https://gcc.gnu.org/viewcvs?rev=249707=gcc=rev
Log:
Backports from trunk:

2016-08-15  Segher Boessenkool  
PR rtl-optimization/73650
* lra-constraints.c (simple_move_p): If the insn is multiple_sets
it is not a simple move.

2017-01-20  Segher Boessenkool  
PR target/61729
PR target/77850
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
read from, for big endian.

2017-04-12  Segher Boessenkool  
PR target/80382
* config/rs6000/sync.md (atomic_load, atomic_store
PR middle-end/80692
* real.c (do_compare): Give decimal_do_compare preference over
comparing just the signs.

2017-05-31  Segher Boessenkool  
PR target/80618
* config/rs6000/vector.md (*vector_uneq): Write the nor in the
splitter result in the canonical way.

2017-06-09  Segher Boessenkool  
PR target/80966
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
gen_add3_insn did not fail.
* config/rs6000/rs6000.md (add3): If asked to add a constant to
r0, construct that number in a temporary reg and add that reg to r0.
If asked to put the result in r0 as well, fail.

2017-06-23  Segher Boessenkool  
PR middle-end/80902
* builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
a call, force the call to not be a tail call.

gcc/testsuite/
Backports from trunk:

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* gcc.c-torture/execute/pr80692.c: New testcase.

2017-06-09  Segher Boessenkool  
PR target/80966
* gcc.target/powerpc/stack-limit.c: New testcase.

Added:
branches/gcc-5-branch/gcc/testsuite/gcc.c-torture/execute/pr80692.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/powerpc/stack-limit.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/builtins.c
branches/gcc-5-branch/gcc/config/rs6000/rs6000.c
branches/gcc-5-branch/gcc/config/rs6000/rs6000.md
branches/gcc-5-branch/gcc/config/rs6000/sync.md
branches/gcc-5-branch/gcc/config/rs6000/vector.md
branches/gcc-5-branch/gcc/lra-constraints.c
branches/gcc-5-branch/gcc/real.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug target/80966] ICE with -fstack-limit-register and large frames

2017-06-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80966

--- Comment #4 from Segher Boessenkool  ---
Author: segher
Date: Tue Jun 27 18:24:51 2017
New Revision: 249707

URL: https://gcc.gnu.org/viewcvs?rev=249707=gcc=rev
Log:
Backports from trunk:

2016-08-15  Segher Boessenkool  
PR rtl-optimization/73650
* lra-constraints.c (simple_move_p): If the insn is multiple_sets
it is not a simple move.

2017-01-20  Segher Boessenkool  
PR target/61729
PR target/77850
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
read from, for big endian.

2017-04-12  Segher Boessenkool  
PR target/80382
* config/rs6000/sync.md (atomic_load, atomic_store
PR middle-end/80692
* real.c (do_compare): Give decimal_do_compare preference over
comparing just the signs.

2017-05-31  Segher Boessenkool  
PR target/80618
* config/rs6000/vector.md (*vector_uneq): Write the nor in the
splitter result in the canonical way.

2017-06-09  Segher Boessenkool  
PR target/80966
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
gen_add3_insn did not fail.
* config/rs6000/rs6000.md (add3): If asked to add a constant to
r0, construct that number in a temporary reg and add that reg to r0.
If asked to put the result in r0 as well, fail.

2017-06-23  Segher Boessenkool  
PR middle-end/80902
* builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
a call, force the call to not be a tail call.

gcc/testsuite/
Backports from trunk:

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* gcc.c-torture/execute/pr80692.c: New testcase.

2017-06-09  Segher Boessenkool  
PR target/80966
* gcc.target/powerpc/stack-limit.c: New testcase.

Added:
branches/gcc-5-branch/gcc/testsuite/gcc.c-torture/execute/pr80692.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/powerpc/stack-limit.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/builtins.c
branches/gcc-5-branch/gcc/config/rs6000/rs6000.c
branches/gcc-5-branch/gcc/config/rs6000/rs6000.md
branches/gcc-5-branch/gcc/config/rs6000/sync.md
branches/gcc-5-branch/gcc/config/rs6000/vector.md
branches/gcc-5-branch/gcc/lra-constraints.c
branches/gcc-5-branch/gcc/real.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug target/61729] FAIL: g++.dg/abi/scoped1.C -std=gnu++11 execution test

2017-06-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61729

--- Comment #6 from Segher Boessenkool  ---
Author: segher
Date: Tue Jun 27 18:24:51 2017
New Revision: 249707

URL: https://gcc.gnu.org/viewcvs?rev=249707=gcc=rev
Log:
Backports from trunk:

2016-08-15  Segher Boessenkool  
PR rtl-optimization/73650
* lra-constraints.c (simple_move_p): If the insn is multiple_sets
it is not a simple move.

2017-01-20  Segher Boessenkool  
PR target/61729
PR target/77850
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
read from, for big endian.

2017-04-12  Segher Boessenkool  
PR target/80382
* config/rs6000/sync.md (atomic_load, atomic_store
PR middle-end/80692
* real.c (do_compare): Give decimal_do_compare preference over
comparing just the signs.

2017-05-31  Segher Boessenkool  
PR target/80618
* config/rs6000/vector.md (*vector_uneq): Write the nor in the
splitter result in the canonical way.

2017-06-09  Segher Boessenkool  
PR target/80966
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
gen_add3_insn did not fail.
* config/rs6000/rs6000.md (add3): If asked to add a constant to
r0, construct that number in a temporary reg and add that reg to r0.
If asked to put the result in r0 as well, fail.

2017-06-23  Segher Boessenkool  
PR middle-end/80902
* builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
a call, force the call to not be a tail call.

gcc/testsuite/
Backports from trunk:

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* gcc.c-torture/execute/pr80692.c: New testcase.

2017-06-09  Segher Boessenkool  
PR target/80966
* gcc.target/powerpc/stack-limit.c: New testcase.

Added:
branches/gcc-5-branch/gcc/testsuite/gcc.c-torture/execute/pr80692.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/powerpc/stack-limit.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/builtins.c
branches/gcc-5-branch/gcc/config/rs6000/rs6000.c
branches/gcc-5-branch/gcc/config/rs6000/rs6000.md
branches/gcc-5-branch/gcc/config/rs6000/sync.md
branches/gcc-5-branch/gcc/config/rs6000/vector.md
branches/gcc-5-branch/gcc/lra-constraints.c
branches/gcc-5-branch/gcc/real.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug target/77850] FAIL: gcc.dg/compat/scalar-by-value-4 c_compat_x_tst.o-c_compat_y_tst.o execute

2017-06-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77850

--- Comment #6 from Segher Boessenkool  ---
Author: segher
Date: Tue Jun 27 18:24:51 2017
New Revision: 249707

URL: https://gcc.gnu.org/viewcvs?rev=249707=gcc=rev
Log:
Backports from trunk:

2016-08-15  Segher Boessenkool  
PR rtl-optimization/73650
* lra-constraints.c (simple_move_p): If the insn is multiple_sets
it is not a simple move.

2017-01-20  Segher Boessenkool  
PR target/61729
PR target/77850
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
read from, for big endian.

2017-04-12  Segher Boessenkool  
PR target/80382
* config/rs6000/sync.md (atomic_load, atomic_store
PR middle-end/80692
* real.c (do_compare): Give decimal_do_compare preference over
comparing just the signs.

2017-05-31  Segher Boessenkool  
PR target/80618
* config/rs6000/vector.md (*vector_uneq): Write the nor in the
splitter result in the canonical way.

2017-06-09  Segher Boessenkool  
PR target/80966
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
gen_add3_insn did not fail.
* config/rs6000/rs6000.md (add3): If asked to add a constant to
r0, construct that number in a temporary reg and add that reg to r0.
If asked to put the result in r0 as well, fail.

2017-06-23  Segher Boessenkool  
PR middle-end/80902
* builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
a call, force the call to not be a tail call.

gcc/testsuite/
Backports from trunk:

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* gcc.c-torture/execute/pr80692.c: New testcase.

2017-06-09  Segher Boessenkool  
PR target/80966
* gcc.target/powerpc/stack-limit.c: New testcase.

Added:
branches/gcc-5-branch/gcc/testsuite/gcc.c-torture/execute/pr80692.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/powerpc/stack-limit.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/builtins.c
branches/gcc-5-branch/gcc/config/rs6000/rs6000.c
branches/gcc-5-branch/gcc/config/rs6000/rs6000.md
branches/gcc-5-branch/gcc/config/rs6000/sync.md
branches/gcc-5-branch/gcc/config/rs6000/vector.md
branches/gcc-5-branch/gcc/lra-constraints.c
branches/gcc-5-branch/gcc/real.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug rtl-optimization/73650] powerpc: -mcpu=e500mc hits ICE: insn does not satisfy its constraints

2017-06-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=73650

--- Comment #11 from Segher Boessenkool  ---
Author: segher
Date: Tue Jun 27 18:24:51 2017
New Revision: 249707

URL: https://gcc.gnu.org/viewcvs?rev=249707=gcc=rev
Log:
Backports from trunk:

2016-08-15  Segher Boessenkool  
PR rtl-optimization/73650
* lra-constraints.c (simple_move_p): If the insn is multiple_sets
it is not a simple move.

2017-01-20  Segher Boessenkool  
PR target/61729
PR target/77850
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
read from, for big endian.

2017-04-12  Segher Boessenkool  
PR target/80382
* config/rs6000/sync.md (atomic_load, atomic_store
PR middle-end/80692
* real.c (do_compare): Give decimal_do_compare preference over
comparing just the signs.

2017-05-31  Segher Boessenkool  
PR target/80618
* config/rs6000/vector.md (*vector_uneq): Write the nor in the
splitter result in the canonical way.

2017-06-09  Segher Boessenkool  
PR target/80966
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
gen_add3_insn did not fail.
* config/rs6000/rs6000.md (add3): If asked to add a constant to
r0, construct that number in a temporary reg and add that reg to r0.
If asked to put the result in r0 as well, fail.

2017-06-23  Segher Boessenkool  
PR middle-end/80902
* builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
a call, force the call to not be a tail call.

gcc/testsuite/
Backports from trunk:

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* gcc.c-torture/execute/pr80692.c: New testcase.

2017-06-09  Segher Boessenkool  
PR target/80966
* gcc.target/powerpc/stack-limit.c: New testcase.

Added:
branches/gcc-5-branch/gcc/testsuite/gcc.c-torture/execute/pr80692.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/powerpc/stack-limit.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/builtins.c
branches/gcc-5-branch/gcc/config/rs6000/rs6000.c
branches/gcc-5-branch/gcc/config/rs6000/rs6000.md
branches/gcc-5-branch/gcc/config/rs6000/sync.md
branches/gcc-5-branch/gcc/config/rs6000/vector.md
branches/gcc-5-branch/gcc/lra-constraints.c
branches/gcc-5-branch/gcc/real.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug middle-end/80692] _Decimal64 -0 != 0 unless optimization is turned off

2017-06-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80692

--- Comment #6 from Segher Boessenkool  ---
Author: segher
Date: Tue Jun 27 18:24:51 2017
New Revision: 249707

URL: https://gcc.gnu.org/viewcvs?rev=249707=gcc=rev
Log:
Backports from trunk:

2016-08-15  Segher Boessenkool  
PR rtl-optimization/73650
* lra-constraints.c (simple_move_p): If the insn is multiple_sets
it is not a simple move.

2017-01-20  Segher Boessenkool  
PR target/61729
PR target/77850
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
read from, for big endian.

2017-04-12  Segher Boessenkool  
PR target/80382
* config/rs6000/sync.md (atomic_load, atomic_store
PR middle-end/80692
* real.c (do_compare): Give decimal_do_compare preference over
comparing just the signs.

2017-05-31  Segher Boessenkool  
PR target/80618
* config/rs6000/vector.md (*vector_uneq): Write the nor in the
splitter result in the canonical way.

2017-06-09  Segher Boessenkool  
PR target/80966
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
gen_add3_insn did not fail.
* config/rs6000/rs6000.md (add3): If asked to add a constant to
r0, construct that number in a temporary reg and add that reg to r0.
If asked to put the result in r0 as well, fail.

2017-06-23  Segher Boessenkool  
PR middle-end/80902
* builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
a call, force the call to not be a tail call.

gcc/testsuite/
Backports from trunk:

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* gcc.c-torture/execute/pr80692.c: New testcase.

2017-06-09  Segher Boessenkool  
PR target/80966
* gcc.target/powerpc/stack-limit.c: New testcase.

Added:
branches/gcc-5-branch/gcc/testsuite/gcc.c-torture/execute/pr80692.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/powerpc/stack-limit.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/builtins.c
branches/gcc-5-branch/gcc/config/rs6000/rs6000.c
branches/gcc-5-branch/gcc/config/rs6000/rs6000.md
branches/gcc-5-branch/gcc/config/rs6000/sync.md
branches/gcc-5-branch/gcc/config/rs6000/vector.md
branches/gcc-5-branch/gcc/lra-constraints.c
branches/gcc-5-branch/gcc/real.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug c++/72763] [5/6/7/8 Regression] incorrectly accepts invalid C++11 code that instantiates a non-template class

2017-06-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72763

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |INVALID

--- Comment #4 from Jason Merrill  ---
This looks well-formed to me; we don't substitute into C until we need D to
be complete, which we don't when we're just using A.  If you change the
declaration of a to

A::D a;

then you get the error you're expecting.

[Bug target/81225] [6/7/8 Regression] ICE with -mavx512ifma -O3 -ffloat-store

2017-06-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81225

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  ---
I'll have a look.

[Bug libstdc++/80187] C++ variant should be trivially copy constructible if possible

2017-06-27 Thread timshen at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80187

--- Comment #6 from Tim Shen  ---
Author: timshen
Date: Tue Jun 27 18:19:03 2017
New Revision: 249706

URL: https://gcc.gnu.org/viewcvs?rev=249706=gcc=rev
Log:
PR libstdc++/80187
* include/std/variant (variant::variant, variant::~variant,
variant::operator=): Implement triviality forwarding for four
special member functions.
* testsuite/20_util/variant/compile.cc: Tests.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/variant
trunk/libstdc++-v3/testsuite/20_util/variant/compile.cc

[Bug c++/72763] [5/6/7/8 Regression] incorrectly accepts invalid C++11 code that instantiates a non-template class

2017-06-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72763

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||jason at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org

[Bug c++/45976] optional template keyword is not accepted by g++

2017-06-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45976

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||jason at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org

[Bug c++/81234] [7/8 Regression] flexible array member not at end of ‘struct

2017-06-27 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81234

Jonathan Wakely  changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org

--- Comment #2 from Jonathan Wakely  ---
The orhpaned notes started with r231665 and the pedwarn became an error with
r241143

[Bug libgomp/81108] OpenMP doacross (omp do/for ordered) performance

2017-06-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81108

--- Comment #9 from Jakub Jelinek  ---
With schedule(static) or schedule(dynamic) etc. I believe the compiler is not
allowed to do it, at least if it can't prove it won't be observable.
So, if you have
int cnt = 0;
#pragma omp parallel for schedule(static) ordered(2) collapse(2) \
firstprivate(cnt)
for (j = ...)
for (i = ...)
{
  #pragma omp ordered depend(sink:j,i-1) depend(sink:j-1,i)
depend(sink:j-1,i-1)
  arr[i][j] = omp_get_thread_num ();
  arr2[i][j] = cnt++;
  grid[...] = ...;
  #pragma omp ordered source
}
then you really can't schedule arbitrarily, the standard specifies the
requirements, and the above code observes both the thread num each logical
iteration is assigned to, and in what order.
The only way where you have complete freedom is no schedule clause (then it is
implementation defined what happens) or schedule(auto) (likewise).
But it still requires advanced loop optimizations to find optimal schedule for
the particular loop (and other loops would need different scheduling
decisions), and the schedule would also need to take into account some
constraints of the doacross post/wait operations (it has to ensure all threads
don't get stuck waiting for something that hasn't been scheduled).  Plus unless
we want complex scheduling functions in the library the compiler has to map the
logical iterations to the logical iterations of the parallelized loop and
similarly map the indices.  It is doable, but huge amount of work.

[Bug c++/81234] [7/8 Regression] flexible array member not at end of ‘struct

2017-06-27 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81234

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-06-27
  Known to work||6.3.1
Summary|[regression] flexible array |[7/8 Regression] flexible
   |member not at end of|array member not at end of
   |‘struct |‘struct
 Ever confirmed|0   |1
  Known to fail||7.1.0, 8.0

--- Comment #1 from Jonathan Wakely  ---
The code is valid in C, so presumably should be valid with G++ too.

GCC 6 gives a warning with -pedantic, but prints the accompanying notes even
without -pedantic!


$ g++ foo.c -pedantic
foo.c:4:27: warning: flexible array member ‘DataPacket::data’ not at end of
‘struct AckPacket’ [-Wpedantic]
 char data[];
   ^
foo.c:9:21: note: next member ‘int AckPacket::a’ declared here
 int a,b,c;
 ^
foo.c:7:16: note: in the definition of ‘struct AckPacket’
 struct AckPacket {
^


$ g++ foo.c 
foo.c:9:21: note: next member ‘int AckPacket::a’ declared here
 int a,b,c;
 ^
foo.c:7:16: note: in the definition of ‘struct AckPacket’
 struct AckPacket {
^

[Bug target/68491] libgcc calls __get_cpuid with 0 level breaks on early 486

2017-06-27 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68491

--- Comment #11 from Uroš Bizjak  ---
(In reply to Andy Lutomirski from comment #9)
> I'm a bit late to the party, but this patch seems dubious to me. 
> __get_cpuid_max() fails to distinguish between CPUs that have max level 0
> (although I doubt that any such CPUs exist) and CPUs that don't have CPUID
> at all.

No, cpuid leaf 0 will never return zero [1].

[1] https://en.wikipedia.org/wiki/CPUID#EAX.3D0:_Highest_Function_Parameter

[Bug rtl-optimization/60818] ICE in validate_condition_mode on powerpc*-linux-gnu*

2017-06-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60818

--- Comment #28 from Segher Boessenkool  ---
Author: segher
Date: Tue Jun 27 17:11:01 2017
New Revision: 249700

URL: https://gcc.gnu.org/viewcvs?rev=249700=gcc=rev
Log:
Backports from trunk:

2016-08-15  Segher Boessenkool  
PR rtl-optimization/73650
* lra-constraints.c (simple_move_p): If the insn is multiple_sets
it is not a simple move.

2017-01-20  Segher Boessenkool  
PR target/61729
PR target/77850
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
read from, for big endian.

2017-04-04  Segher Boessenkool  
PR rtl-optimization/60818
* simplify-rtx.c (simplify_binary_operation_1): Do not replace
a compare of comparisons with the thing compared if this results
in a different machine mode.

2017-04-12  Segher Boessenkool  
PR target/80382
* config/rs6000/sync.md (atomic_load, atomic_store
PR rtl-optimization/80429
* ira.c (split_live_ranges_for_shrink_wrap): Don't split regs that
are only used in debug insns.

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* real.c (do_compare): Give decimal_do_compare preference over
comparing just the signs.

2017-05-31  Segher Boessenkool  
PR target/80618
* config/rs6000/vector.md (*vector_uneq): Write the nor in the
splitter result in the canonical way.

2017-06-09  Segher Boessenkool  
PR target/80966
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
gen_add3_insn did not fail.
* config/rs6000/rs6000.md (add3): If asked to add a constant to
r0, construct that number in a temporary reg and add that reg to r0.
If asked to put the result in r0 as well, fail.

2017-06-23  Segher Boessenkool  
PR middle-end/80902
* builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
a call, force the call to not be a tail call.

gcc/testsuite/
Backports from trunk:

2017-04-04  Segher Boessenkool  
PR rtl-optimization/60818
* gcc.c-torture/compile/pr60818.c: New testcase.

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* gcc.c-torture/execute/pr80692.c: New testcase.

2017-06-09  Segher Boessenkool  
PR target/80966
* gcc.target/powerpc/stack-limit.c: New testcase.

Added:
branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/compile/pr60818.c
branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/execute/pr80692.c
branches/gcc-6-branch/gcc/testsuite/gcc.target/powerpc/stack-limit.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/builtins.c
branches/gcc-6-branch/gcc/config/rs6000/rs6000.c
branches/gcc-6-branch/gcc/config/rs6000/rs6000.md
branches/gcc-6-branch/gcc/config/rs6000/sync.md
branches/gcc-6-branch/gcc/config/rs6000/vector.md
branches/gcc-6-branch/gcc/ira.c
branches/gcc-6-branch/gcc/lra-constraints.c
branches/gcc-6-branch/gcc/real.c
branches/gcc-6-branch/gcc/simplify-rtx.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug rtl-optimization/80429] -fcompare-debug failure on ppc64le with LRA

2017-06-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80429

--- Comment #6 from Segher Boessenkool  ---
Author: segher
Date: Tue Jun 27 17:11:01 2017
New Revision: 249700

URL: https://gcc.gnu.org/viewcvs?rev=249700=gcc=rev
Log:
Backports from trunk:

2016-08-15  Segher Boessenkool  
PR rtl-optimization/73650
* lra-constraints.c (simple_move_p): If the insn is multiple_sets
it is not a simple move.

2017-01-20  Segher Boessenkool  
PR target/61729
PR target/77850
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
read from, for big endian.

2017-04-04  Segher Boessenkool  
PR rtl-optimization/60818
* simplify-rtx.c (simplify_binary_operation_1): Do not replace
a compare of comparisons with the thing compared if this results
in a different machine mode.

2017-04-12  Segher Boessenkool  
PR target/80382
* config/rs6000/sync.md (atomic_load, atomic_store
PR rtl-optimization/80429
* ira.c (split_live_ranges_for_shrink_wrap): Don't split regs that
are only used in debug insns.

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* real.c (do_compare): Give decimal_do_compare preference over
comparing just the signs.

2017-05-31  Segher Boessenkool  
PR target/80618
* config/rs6000/vector.md (*vector_uneq): Write the nor in the
splitter result in the canonical way.

2017-06-09  Segher Boessenkool  
PR target/80966
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
gen_add3_insn did not fail.
* config/rs6000/rs6000.md (add3): If asked to add a constant to
r0, construct that number in a temporary reg and add that reg to r0.
If asked to put the result in r0 as well, fail.

2017-06-23  Segher Boessenkool  
PR middle-end/80902
* builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
a call, force the call to not be a tail call.

gcc/testsuite/
Backports from trunk:

2017-04-04  Segher Boessenkool  
PR rtl-optimization/60818
* gcc.c-torture/compile/pr60818.c: New testcase.

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* gcc.c-torture/execute/pr80692.c: New testcase.

2017-06-09  Segher Boessenkool  
PR target/80966
* gcc.target/powerpc/stack-limit.c: New testcase.

Added:
branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/compile/pr60818.c
branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/execute/pr80692.c
branches/gcc-6-branch/gcc/testsuite/gcc.target/powerpc/stack-limit.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/builtins.c
branches/gcc-6-branch/gcc/config/rs6000/rs6000.c
branches/gcc-6-branch/gcc/config/rs6000/rs6000.md
branches/gcc-6-branch/gcc/config/rs6000/sync.md
branches/gcc-6-branch/gcc/config/rs6000/vector.md
branches/gcc-6-branch/gcc/ira.c
branches/gcc-6-branch/gcc/lra-constraints.c
branches/gcc-6-branch/gcc/real.c
branches/gcc-6-branch/gcc/simplify-rtx.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug middle-end/80902] A problem in expand_builtin_atomic_fetch_op

2017-06-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80902

--- Comment #2 from Segher Boessenkool  ---
Author: segher
Date: Tue Jun 27 17:11:01 2017
New Revision: 249700

URL: https://gcc.gnu.org/viewcvs?rev=249700=gcc=rev
Log:
Backports from trunk:

2016-08-15  Segher Boessenkool  
PR rtl-optimization/73650
* lra-constraints.c (simple_move_p): If the insn is multiple_sets
it is not a simple move.

2017-01-20  Segher Boessenkool  
PR target/61729
PR target/77850
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
read from, for big endian.

2017-04-04  Segher Boessenkool  
PR rtl-optimization/60818
* simplify-rtx.c (simplify_binary_operation_1): Do not replace
a compare of comparisons with the thing compared if this results
in a different machine mode.

2017-04-12  Segher Boessenkool  
PR target/80382
* config/rs6000/sync.md (atomic_load, atomic_store
PR rtl-optimization/80429
* ira.c (split_live_ranges_for_shrink_wrap): Don't split regs that
are only used in debug insns.

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* real.c (do_compare): Give decimal_do_compare preference over
comparing just the signs.

2017-05-31  Segher Boessenkool  
PR target/80618
* config/rs6000/vector.md (*vector_uneq): Write the nor in the
splitter result in the canonical way.

2017-06-09  Segher Boessenkool  
PR target/80966
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
gen_add3_insn did not fail.
* config/rs6000/rs6000.md (add3): If asked to add a constant to
r0, construct that number in a temporary reg and add that reg to r0.
If asked to put the result in r0 as well, fail.

2017-06-23  Segher Boessenkool  
PR middle-end/80902
* builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
a call, force the call to not be a tail call.

gcc/testsuite/
Backports from trunk:

2017-04-04  Segher Boessenkool  
PR rtl-optimization/60818
* gcc.c-torture/compile/pr60818.c: New testcase.

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* gcc.c-torture/execute/pr80692.c: New testcase.

2017-06-09  Segher Boessenkool  
PR target/80966
* gcc.target/powerpc/stack-limit.c: New testcase.

Added:
branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/compile/pr60818.c
branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/execute/pr80692.c
branches/gcc-6-branch/gcc/testsuite/gcc.target/powerpc/stack-limit.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/builtins.c
branches/gcc-6-branch/gcc/config/rs6000/rs6000.c
branches/gcc-6-branch/gcc/config/rs6000/rs6000.md
branches/gcc-6-branch/gcc/config/rs6000/sync.md
branches/gcc-6-branch/gcc/config/rs6000/vector.md
branches/gcc-6-branch/gcc/ira.c
branches/gcc-6-branch/gcc/lra-constraints.c
branches/gcc-6-branch/gcc/real.c
branches/gcc-6-branch/gcc/simplify-rtx.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug target/80966] ICE with -fstack-limit-register and large frames

2017-06-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80966

--- Comment #3 from Segher Boessenkool  ---
Author: segher
Date: Tue Jun 27 17:11:01 2017
New Revision: 249700

URL: https://gcc.gnu.org/viewcvs?rev=249700=gcc=rev
Log:
Backports from trunk:

2016-08-15  Segher Boessenkool  
PR rtl-optimization/73650
* lra-constraints.c (simple_move_p): If the insn is multiple_sets
it is not a simple move.

2017-01-20  Segher Boessenkool  
PR target/61729
PR target/77850
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
read from, for big endian.

2017-04-04  Segher Boessenkool  
PR rtl-optimization/60818
* simplify-rtx.c (simplify_binary_operation_1): Do not replace
a compare of comparisons with the thing compared if this results
in a different machine mode.

2017-04-12  Segher Boessenkool  
PR target/80382
* config/rs6000/sync.md (atomic_load, atomic_store
PR rtl-optimization/80429
* ira.c (split_live_ranges_for_shrink_wrap): Don't split regs that
are only used in debug insns.

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* real.c (do_compare): Give decimal_do_compare preference over
comparing just the signs.

2017-05-31  Segher Boessenkool  
PR target/80618
* config/rs6000/vector.md (*vector_uneq): Write the nor in the
splitter result in the canonical way.

2017-06-09  Segher Boessenkool  
PR target/80966
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
gen_add3_insn did not fail.
* config/rs6000/rs6000.md (add3): If asked to add a constant to
r0, construct that number in a temporary reg and add that reg to r0.
If asked to put the result in r0 as well, fail.

2017-06-23  Segher Boessenkool  
PR middle-end/80902
* builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
a call, force the call to not be a tail call.

gcc/testsuite/
Backports from trunk:

2017-04-04  Segher Boessenkool  
PR rtl-optimization/60818
* gcc.c-torture/compile/pr60818.c: New testcase.

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* gcc.c-torture/execute/pr80692.c: New testcase.

2017-06-09  Segher Boessenkool  
PR target/80966
* gcc.target/powerpc/stack-limit.c: New testcase.

Added:
branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/compile/pr60818.c
branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/execute/pr80692.c
branches/gcc-6-branch/gcc/testsuite/gcc.target/powerpc/stack-limit.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/builtins.c
branches/gcc-6-branch/gcc/config/rs6000/rs6000.c
branches/gcc-6-branch/gcc/config/rs6000/rs6000.md
branches/gcc-6-branch/gcc/config/rs6000/sync.md
branches/gcc-6-branch/gcc/config/rs6000/vector.md
branches/gcc-6-branch/gcc/ira.c
branches/gcc-6-branch/gcc/lra-constraints.c
branches/gcc-6-branch/gcc/real.c
branches/gcc-6-branch/gcc/simplify-rtx.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug middle-end/80692] _Decimal64 -0 != 0 unless optimization is turned off

2017-06-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80692

--- Comment #5 from Segher Boessenkool  ---
Author: segher
Date: Tue Jun 27 17:11:01 2017
New Revision: 249700

URL: https://gcc.gnu.org/viewcvs?rev=249700=gcc=rev
Log:
Backports from trunk:

2016-08-15  Segher Boessenkool  
PR rtl-optimization/73650
* lra-constraints.c (simple_move_p): If the insn is multiple_sets
it is not a simple move.

2017-01-20  Segher Boessenkool  
PR target/61729
PR target/77850
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
read from, for big endian.

2017-04-04  Segher Boessenkool  
PR rtl-optimization/60818
* simplify-rtx.c (simplify_binary_operation_1): Do not replace
a compare of comparisons with the thing compared if this results
in a different machine mode.

2017-04-12  Segher Boessenkool  
PR target/80382
* config/rs6000/sync.md (atomic_load, atomic_store
PR rtl-optimization/80429
* ira.c (split_live_ranges_for_shrink_wrap): Don't split regs that
are only used in debug insns.

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* real.c (do_compare): Give decimal_do_compare preference over
comparing just the signs.

2017-05-31  Segher Boessenkool  
PR target/80618
* config/rs6000/vector.md (*vector_uneq): Write the nor in the
splitter result in the canonical way.

2017-06-09  Segher Boessenkool  
PR target/80966
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
gen_add3_insn did not fail.
* config/rs6000/rs6000.md (add3): If asked to add a constant to
r0, construct that number in a temporary reg and add that reg to r0.
If asked to put the result in r0 as well, fail.

2017-06-23  Segher Boessenkool  
PR middle-end/80902
* builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
a call, force the call to not be a tail call.

gcc/testsuite/
Backports from trunk:

2017-04-04  Segher Boessenkool  
PR rtl-optimization/60818
* gcc.c-torture/compile/pr60818.c: New testcase.

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* gcc.c-torture/execute/pr80692.c: New testcase.

2017-06-09  Segher Boessenkool  
PR target/80966
* gcc.target/powerpc/stack-limit.c: New testcase.

Added:
branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/compile/pr60818.c
branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/execute/pr80692.c
branches/gcc-6-branch/gcc/testsuite/gcc.target/powerpc/stack-limit.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/builtins.c
branches/gcc-6-branch/gcc/config/rs6000/rs6000.c
branches/gcc-6-branch/gcc/config/rs6000/rs6000.md
branches/gcc-6-branch/gcc/config/rs6000/sync.md
branches/gcc-6-branch/gcc/config/rs6000/vector.md
branches/gcc-6-branch/gcc/ira.c
branches/gcc-6-branch/gcc/lra-constraints.c
branches/gcc-6-branch/gcc/real.c
branches/gcc-6-branch/gcc/simplify-rtx.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug target/80382] ICE with error: unrecognizable insn

2017-06-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80382

--- Comment #13 from Segher Boessenkool  ---
Author: segher
Date: Tue Jun 27 17:11:01 2017
New Revision: 249700

URL: https://gcc.gnu.org/viewcvs?rev=249700=gcc=rev
Log:
Backports from trunk:

2016-08-15  Segher Boessenkool  
PR rtl-optimization/73650
* lra-constraints.c (simple_move_p): If the insn is multiple_sets
it is not a simple move.

2017-01-20  Segher Boessenkool  
PR target/61729
PR target/77850
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
read from, for big endian.

2017-04-04  Segher Boessenkool  
PR rtl-optimization/60818
* simplify-rtx.c (simplify_binary_operation_1): Do not replace
a compare of comparisons with the thing compared if this results
in a different machine mode.

2017-04-12  Segher Boessenkool  
PR target/80382
* config/rs6000/sync.md (atomic_load, atomic_store
PR rtl-optimization/80429
* ira.c (split_live_ranges_for_shrink_wrap): Don't split regs that
are only used in debug insns.

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* real.c (do_compare): Give decimal_do_compare preference over
comparing just the signs.

2017-05-31  Segher Boessenkool  
PR target/80618
* config/rs6000/vector.md (*vector_uneq): Write the nor in the
splitter result in the canonical way.

2017-06-09  Segher Boessenkool  
PR target/80966
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
gen_add3_insn did not fail.
* config/rs6000/rs6000.md (add3): If asked to add a constant to
r0, construct that number in a temporary reg and add that reg to r0.
If asked to put the result in r0 as well, fail.

2017-06-23  Segher Boessenkool  
PR middle-end/80902
* builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
a call, force the call to not be a tail call.

gcc/testsuite/
Backports from trunk:

2017-04-04  Segher Boessenkool  
PR rtl-optimization/60818
* gcc.c-torture/compile/pr60818.c: New testcase.

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* gcc.c-torture/execute/pr80692.c: New testcase.

2017-06-09  Segher Boessenkool  
PR target/80966
* gcc.target/powerpc/stack-limit.c: New testcase.

Added:
branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/compile/pr60818.c
branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/execute/pr80692.c
branches/gcc-6-branch/gcc/testsuite/gcc.target/powerpc/stack-limit.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/builtins.c
branches/gcc-6-branch/gcc/config/rs6000/rs6000.c
branches/gcc-6-branch/gcc/config/rs6000/rs6000.md
branches/gcc-6-branch/gcc/config/rs6000/sync.md
branches/gcc-6-branch/gcc/config/rs6000/vector.md
branches/gcc-6-branch/gcc/ira.c
branches/gcc-6-branch/gcc/lra-constraints.c
branches/gcc-6-branch/gcc/real.c
branches/gcc-6-branch/gcc/simplify-rtx.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug target/80618] [8 regression] test case gcc.dg/pr50310-2.c fails with ICE starting with 247544

2017-06-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80618

--- Comment #10 from Segher Boessenkool  ---
Author: segher
Date: Tue Jun 27 17:11:01 2017
New Revision: 249700

URL: https://gcc.gnu.org/viewcvs?rev=249700=gcc=rev
Log:
Backports from trunk:

2016-08-15  Segher Boessenkool  
PR rtl-optimization/73650
* lra-constraints.c (simple_move_p): If the insn is multiple_sets
it is not a simple move.

2017-01-20  Segher Boessenkool  
PR target/61729
PR target/77850
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
read from, for big endian.

2017-04-04  Segher Boessenkool  
PR rtl-optimization/60818
* simplify-rtx.c (simplify_binary_operation_1): Do not replace
a compare of comparisons with the thing compared if this results
in a different machine mode.

2017-04-12  Segher Boessenkool  
PR target/80382
* config/rs6000/sync.md (atomic_load, atomic_store
PR rtl-optimization/80429
* ira.c (split_live_ranges_for_shrink_wrap): Don't split regs that
are only used in debug insns.

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* real.c (do_compare): Give decimal_do_compare preference over
comparing just the signs.

2017-05-31  Segher Boessenkool  
PR target/80618
* config/rs6000/vector.md (*vector_uneq): Write the nor in the
splitter result in the canonical way.

2017-06-09  Segher Boessenkool  
PR target/80966
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
gen_add3_insn did not fail.
* config/rs6000/rs6000.md (add3): If asked to add a constant to
r0, construct that number in a temporary reg and add that reg to r0.
If asked to put the result in r0 as well, fail.

2017-06-23  Segher Boessenkool  
PR middle-end/80902
* builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
a call, force the call to not be a tail call.

gcc/testsuite/
Backports from trunk:

2017-04-04  Segher Boessenkool  
PR rtl-optimization/60818
* gcc.c-torture/compile/pr60818.c: New testcase.

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* gcc.c-torture/execute/pr80692.c: New testcase.

2017-06-09  Segher Boessenkool  
PR target/80966
* gcc.target/powerpc/stack-limit.c: New testcase.

Added:
branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/compile/pr60818.c
branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/execute/pr80692.c
branches/gcc-6-branch/gcc/testsuite/gcc.target/powerpc/stack-limit.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/builtins.c
branches/gcc-6-branch/gcc/config/rs6000/rs6000.c
branches/gcc-6-branch/gcc/config/rs6000/rs6000.md
branches/gcc-6-branch/gcc/config/rs6000/sync.md
branches/gcc-6-branch/gcc/config/rs6000/vector.md
branches/gcc-6-branch/gcc/ira.c
branches/gcc-6-branch/gcc/lra-constraints.c
branches/gcc-6-branch/gcc/real.c
branches/gcc-6-branch/gcc/simplify-rtx.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug target/77850] FAIL: gcc.dg/compat/scalar-by-value-4 c_compat_x_tst.o-c_compat_y_tst.o execute

2017-06-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77850

--- Comment #5 from Segher Boessenkool  ---
Author: segher
Date: Tue Jun 27 17:11:01 2017
New Revision: 249700

URL: https://gcc.gnu.org/viewcvs?rev=249700=gcc=rev
Log:
Backports from trunk:

2016-08-15  Segher Boessenkool  
PR rtl-optimization/73650
* lra-constraints.c (simple_move_p): If the insn is multiple_sets
it is not a simple move.

2017-01-20  Segher Boessenkool  
PR target/61729
PR target/77850
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
read from, for big endian.

2017-04-04  Segher Boessenkool  
PR rtl-optimization/60818
* simplify-rtx.c (simplify_binary_operation_1): Do not replace
a compare of comparisons with the thing compared if this results
in a different machine mode.

2017-04-12  Segher Boessenkool  
PR target/80382
* config/rs6000/sync.md (atomic_load, atomic_store
PR rtl-optimization/80429
* ira.c (split_live_ranges_for_shrink_wrap): Don't split regs that
are only used in debug insns.

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* real.c (do_compare): Give decimal_do_compare preference over
comparing just the signs.

2017-05-31  Segher Boessenkool  
PR target/80618
* config/rs6000/vector.md (*vector_uneq): Write the nor in the
splitter result in the canonical way.

2017-06-09  Segher Boessenkool  
PR target/80966
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
gen_add3_insn did not fail.
* config/rs6000/rs6000.md (add3): If asked to add a constant to
r0, construct that number in a temporary reg and add that reg to r0.
If asked to put the result in r0 as well, fail.

2017-06-23  Segher Boessenkool  
PR middle-end/80902
* builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
a call, force the call to not be a tail call.

gcc/testsuite/
Backports from trunk:

2017-04-04  Segher Boessenkool  
PR rtl-optimization/60818
* gcc.c-torture/compile/pr60818.c: New testcase.

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* gcc.c-torture/execute/pr80692.c: New testcase.

2017-06-09  Segher Boessenkool  
PR target/80966
* gcc.target/powerpc/stack-limit.c: New testcase.

Added:
branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/compile/pr60818.c
branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/execute/pr80692.c
branches/gcc-6-branch/gcc/testsuite/gcc.target/powerpc/stack-limit.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/builtins.c
branches/gcc-6-branch/gcc/config/rs6000/rs6000.c
branches/gcc-6-branch/gcc/config/rs6000/rs6000.md
branches/gcc-6-branch/gcc/config/rs6000/sync.md
branches/gcc-6-branch/gcc/config/rs6000/vector.md
branches/gcc-6-branch/gcc/ira.c
branches/gcc-6-branch/gcc/lra-constraints.c
branches/gcc-6-branch/gcc/real.c
branches/gcc-6-branch/gcc/simplify-rtx.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug rtl-optimization/73650] powerpc: -mcpu=e500mc hits ICE: insn does not satisfy its constraints

2017-06-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=73650

--- Comment #10 from Segher Boessenkool  ---
Author: segher
Date: Tue Jun 27 17:11:01 2017
New Revision: 249700

URL: https://gcc.gnu.org/viewcvs?rev=249700=gcc=rev
Log:
Backports from trunk:

2016-08-15  Segher Boessenkool  
PR rtl-optimization/73650
* lra-constraints.c (simple_move_p): If the insn is multiple_sets
it is not a simple move.

2017-01-20  Segher Boessenkool  
PR target/61729
PR target/77850
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
read from, for big endian.

2017-04-04  Segher Boessenkool  
PR rtl-optimization/60818
* simplify-rtx.c (simplify_binary_operation_1): Do not replace
a compare of comparisons with the thing compared if this results
in a different machine mode.

2017-04-12  Segher Boessenkool  
PR target/80382
* config/rs6000/sync.md (atomic_load, atomic_store
PR rtl-optimization/80429
* ira.c (split_live_ranges_for_shrink_wrap): Don't split regs that
are only used in debug insns.

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* real.c (do_compare): Give decimal_do_compare preference over
comparing just the signs.

2017-05-31  Segher Boessenkool  
PR target/80618
* config/rs6000/vector.md (*vector_uneq): Write the nor in the
splitter result in the canonical way.

2017-06-09  Segher Boessenkool  
PR target/80966
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
gen_add3_insn did not fail.
* config/rs6000/rs6000.md (add3): If asked to add a constant to
r0, construct that number in a temporary reg and add that reg to r0.
If asked to put the result in r0 as well, fail.

2017-06-23  Segher Boessenkool  
PR middle-end/80902
* builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
a call, force the call to not be a tail call.

gcc/testsuite/
Backports from trunk:

2017-04-04  Segher Boessenkool  
PR rtl-optimization/60818
* gcc.c-torture/compile/pr60818.c: New testcase.

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* gcc.c-torture/execute/pr80692.c: New testcase.

2017-06-09  Segher Boessenkool  
PR target/80966
* gcc.target/powerpc/stack-limit.c: New testcase.

Added:
branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/compile/pr60818.c
branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/execute/pr80692.c
branches/gcc-6-branch/gcc/testsuite/gcc.target/powerpc/stack-limit.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/builtins.c
branches/gcc-6-branch/gcc/config/rs6000/rs6000.c
branches/gcc-6-branch/gcc/config/rs6000/rs6000.md
branches/gcc-6-branch/gcc/config/rs6000/sync.md
branches/gcc-6-branch/gcc/config/rs6000/vector.md
branches/gcc-6-branch/gcc/ira.c
branches/gcc-6-branch/gcc/lra-constraints.c
branches/gcc-6-branch/gcc/real.c
branches/gcc-6-branch/gcc/simplify-rtx.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug target/61729] FAIL: g++.dg/abi/scoped1.C -std=gnu++11 execution test

2017-06-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61729

--- Comment #5 from Segher Boessenkool  ---
Author: segher
Date: Tue Jun 27 17:11:01 2017
New Revision: 249700

URL: https://gcc.gnu.org/viewcvs?rev=249700=gcc=rev
Log:
Backports from trunk:

2016-08-15  Segher Boessenkool  
PR rtl-optimization/73650
* lra-constraints.c (simple_move_p): If the insn is multiple_sets
it is not a simple move.

2017-01-20  Segher Boessenkool  
PR target/61729
PR target/77850
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
read from, for big endian.

2017-04-04  Segher Boessenkool  
PR rtl-optimization/60818
* simplify-rtx.c (simplify_binary_operation_1): Do not replace
a compare of comparisons with the thing compared if this results
in a different machine mode.

2017-04-12  Segher Boessenkool  
PR target/80382
* config/rs6000/sync.md (atomic_load, atomic_store
PR rtl-optimization/80429
* ira.c (split_live_ranges_for_shrink_wrap): Don't split regs that
are only used in debug insns.

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* real.c (do_compare): Give decimal_do_compare preference over
comparing just the signs.

2017-05-31  Segher Boessenkool  
PR target/80618
* config/rs6000/vector.md (*vector_uneq): Write the nor in the
splitter result in the canonical way.

2017-06-09  Segher Boessenkool  
PR target/80966
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
gen_add3_insn did not fail.
* config/rs6000/rs6000.md (add3): If asked to add a constant to
r0, construct that number in a temporary reg and add that reg to r0.
If asked to put the result in r0 as well, fail.

2017-06-23  Segher Boessenkool  
PR middle-end/80902
* builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
a call, force the call to not be a tail call.

gcc/testsuite/
Backports from trunk:

2017-04-04  Segher Boessenkool  
PR rtl-optimization/60818
* gcc.c-torture/compile/pr60818.c: New testcase.

2017-05-17  Segher Boessenkool  
PR middle-end/80692
* gcc.c-torture/execute/pr80692.c: New testcase.

2017-06-09  Segher Boessenkool  
PR target/80966
* gcc.target/powerpc/stack-limit.c: New testcase.

Added:
branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/compile/pr60818.c
branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/execute/pr80692.c
branches/gcc-6-branch/gcc/testsuite/gcc.target/powerpc/stack-limit.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/builtins.c
branches/gcc-6-branch/gcc/config/rs6000/rs6000.c
branches/gcc-6-branch/gcc/config/rs6000/rs6000.md
branches/gcc-6-branch/gcc/config/rs6000/sync.md
branches/gcc-6-branch/gcc/config/rs6000/vector.md
branches/gcc-6-branch/gcc/ira.c
branches/gcc-6-branch/gcc/lra-constraints.c
branches/gcc-6-branch/gcc/real.c
branches/gcc-6-branch/gcc/simplify-rtx.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug c/81233] --Wdiscarded-qualifiers and Wincompatible-pointer-types missing important detail

2017-06-27 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81233

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-06-27
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
Confirmed, I really think we should be better at this.

I'll take a look, I guess next week.

[Bug c++/81234] New: [regression] flexible array member not at end of ‘struct

2017-06-27 Thread Hi-Angel at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81234

Bug ID: 81234
   Summary: [regression] flexible array member not at end of
‘struct
   Product: gcc
   Version: 7.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: Hi-Angel at yandex dot ru
  Target Milestone: ---

This code used to work prior to gcc-7.1 (it worked on 4.x, and — I just tested
— 6.3 works too, with a warning though):

struct DataPacket {
/* … */
unsigned szdata;
char data[];
};

struct AckPacket {
DataPacket header;
int a,b,c;
};

int main() { return 0; }

However gcc-7.1 bails out with:

λ g++ test.cpp -o a
test.cpp:4:12: error: flexible array member ‘DataPacket::data’ not at
end of ‘struct AckPacket’
  char data[];
^
test.cpp:9:6: note: next member ‘int AckPacket::a’ declared here
  int a,b,c; /* no data below */
  ^
test.cpp:7:8: note: in the definition of ‘struct AckPacket’
 struct AckPacket {

Imo the code is fine. Though I'm open to suggestions into a better design too.

[Bug target/68491] libgcc calls __get_cpuid with 0 level breaks on early 486

2017-06-27 Thread christos at zoulas dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68491

--- Comment #10 from Christos Zoulas  ---
On Jun 27,  4:26pm, gcc-bugzi...@gcc.gnu.org ("luto at kernel dot org") wrote:
-- Subject: [Bug target/68491] libgcc calls __get_cpuid with 0 level breaks o

| I'm a bit late to the party, but this patch seems dubious to me.=20
| __get_cpuid_max() fails to distinguish between CPUs that have max level 0
| (although I doubt that any such CPUs exist) and CPUs that don't have CPUID =
| at
| all.
| 
| Shouldn't __get_cpuid_max return -1 if CPUID isn't there or, alternatively,=
| 
| just generally return the last level + 1 (and 0 if CPUID isn't there)?
| 

Yes, it should. That would be cleaner, but my goal was minimal change
not refactoring :-)

christos

[Bug c/81233] New: --Wdiscarded-qualifiers and Wincompatible-pointer-types missing important detail

2017-06-27 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81233

Bug ID: 81233
   Summary: --Wdiscarded-qualifiers and
Wincompatible-pointer-types missing important detail
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

The -Wdiscarded-qualifiers and -Wincompatible-pointer-types warnings (and
possibly others like these two) point out incompatibilities in expressions
involving conversions between incompatible pointer types but neglect to mention
the actual types of the pointer operands or where they are declared.  For
example, imagine that in the program below the struct is defined in some header
file far removed from the assignment that triggers the warning.  The lack of
detail makes it difficult to tell what the expected types are and what the
appropriate fix is.

$ cat x.c && gcc -S -Wall -xc x.c
struct S { int *p; char *q; const char *r; };

void f (struct S *s)
{
  s->p = s->q;
  s->q = s->r;
}
x.c: In function ‘f’:
x.c:5:8: warning: assignment from incompatible pointer type
[-Wincompatible-pointer-types]
   s->p = s->q;
^
x.c:6:8: warning: assignment discards ‘const’ qualifier from pointer target
type [-Wdiscarded-qualifiers]
   s->q = s->r;
^

In contrast to GCC, Clang issues the following messages:

t.c:5:8: warning: incompatible pointer types assigning to 'int *' from 'char *'
  [-Wincompatible-pointer-types]
  s->p = s->q;
   ^ 
t.c:6:8: warning: assigning to 'char *' from 'const char *' discards qualifiers
  [-Wincompatible-pointer-types-discards-qualifiers]
  s->q = s->r;
   ^ 

[Bug target/68491] libgcc calls __get_cpuid with 0 level breaks on early 486

2017-06-27 Thread luto at kernel dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68491

Andy Lutomirski  changed:

   What|Removed |Added

 CC||luto at kernel dot org

--- Comment #9 from Andy Lutomirski  ---
I'm a bit late to the party, but this patch seems dubious to me. 
__get_cpuid_max() fails to distinguish between CPUs that have max level 0
(although I doubt that any such CPUs exist) and CPUs that don't have CPUID at
all.

Shouldn't __get_cpuid_max return -1 if CPUID isn't there or, alternatively,
just generally return the last level + 1 (and 0 if CPUID isn't there)?

[Bug libstdc++/81221] [7/8 Regression] stl_algo.h: error: ‘__sample’ is not a member of ‘std’

2017-06-27 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81221

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #6 from Jonathan Wakely  ---
Fixed for 7.2

[Bug libstdc++/81221] [7/8 Regression] stl_algo.h: error: ‘__sample’ is not a member of ‘std’

2017-06-27 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81221

--- Comment #5 from Jonathan Wakely  ---
Author: redi
Date: Tue Jun 27 16:23:46 2017
New Revision: 249698

URL: https://gcc.gnu.org/viewcvs?rev=249698=gcc=rev
Log:
PR libstdc++/81221 fix namespace qualification for parallel mode

PR libstdc++/81221
* include/bits/stl_algo.h (sample): Qualify with _GLIBCXX_STD_A not
std.
* testsuite/25_algorithms/sample/81221.cc: New.

Added:
branches/gcc-7-branch/libstdc++-v3/testsuite/25_algorithms/sample/81221.cc
Modified:
branches/gcc-7-branch/libstdc++-v3/ChangeLog
branches/gcc-7-branch/libstdc++-v3/include/bits/stl_algo.h

[Bug libstdc++/81221] [7/8 Regression] stl_algo.h: error: ‘__sample’ is not a member of ‘std’

2017-06-27 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81221

--- Comment #4 from Jonathan Wakely  ---
Author: redi
Date: Tue Jun 27 16:19:16 2017
New Revision: 249697

URL: https://gcc.gnu.org/viewcvs?rev=249697=gcc=rev
Log:
PR libstdc++/81221 only run new test for check-parallel

PR libstdc++/81221
* testsuite/25_algorithms/sample/81221.cc: Disable except for
check-parallel.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/testsuite/25_algorithms/sample/81221.cc

[Bug libgomp/81108] OpenMP doacross (omp do/for ordered) performance

2017-06-27 Thread jeff.science at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81108

--- Comment #8 from Jeff Hammond  ---
I tried with schedule(dynamic) and schedule(static,n) for n=1,8,100.  None of
this made a positive difference.  Is that expected?  I'm happy to make any code
changes that don't break correctness and are still readable.

I don't fully understand the semantics of ordered, but is it illegal for the
compiler to generate blocked code that still orders the iteration space, which
I achieve by explicitly implementing that with tasks.  The following code
performs very well, at least with appropriate tiling (mc,nc).

  _Pragma("omp master")
  {
for (auto i=1; i=1; j--) {
_Pragma("omp for")
for (auto i=1; i<=j; i++) {
  auto x = n+i-j-1;
  auto y = n-i;
  grid[x*n+y] = grid[(x-1)*n+y] + grid[x*n+(y-1)] -
grid[(x-1)*n+(y-1)];
}
  }
  _Pragma("omp master")
  grid[0*n+0] = -grid[(n-1)*n+(n-1)];

[Bug target/81229] ICE in c_tree_chain_next on aarch64

2017-06-27 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81229

--- Comment #3 from Marek Polacek  ---
Started with r248387.

[Bug c++/81232] compiler crashes for template function overload

2017-06-27 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81232

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-06-27
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
GCC should not crash, but your code is invalid (and also crashes Clang):

The problem is that you've defined the second overload with a non-deducible
template parameter:

template static constexpr T ipow(T x, int_<-1>)
{
return static_cast(1) / ipow<-N>(x, int_<-N>());
}

This cannot deduce N, so can only be called with a explicit argument, like
ipow<-1> or ipow<-1, int>.

That means when you call ipow(2, int_<-1>) you invoke the third overload, which
recursively tries to call itself with more and more negative values of N, until
the compiler dies.

[Bug target/81193] PowerPC GCC __builtin_cpu_is and __builtin_cpu_supports should warn about old libraries

2017-06-27 Thread tuliom at linux dot vnet.ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81193

Tulio Magno Quites Machado Filho  changed:

   What|Removed |Added

 CC||tuliom at linux dot 
vnet.ibm.com

--- Comment #7 from Tulio Magno Quites Machado Filho  ---
(In reply to Michael Meissner from comment #4)
> I have no problems with restricting use of __builtin_cpu_ and
> target_clone to GLIBC 2.19 or newer (or whatever the release version is).

That's glibc 2.23.

[Bug libstdc++/81221] [7/8 Regression] stl_algo.h: error: ‘__sample’ is not a member of ‘std’

2017-06-27 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81221

--- Comment #3 from Jonathan Wakely  ---
Author: redi
Date: Tue Jun 27 14:44:50 2017
New Revision: 249692

URL: https://gcc.gnu.org/viewcvs?rev=249692=gcc=rev
Log:
PR libstdc++/81221 fix namespace qualification for parallel mode

PR libstdc++/81221
* include/bits/stl_algo.h (sample): Qualify with _GLIBCXX_STD_A not
std.
* testsuite/25_algorithms/sample/81221.cc: New.

Added:
trunk/libstdc++-v3/testsuite/25_algorithms/sample/81221.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/stl_algo.h

[Bug c++/81232] New: compiler crashes for template function overload

2017-06-27 Thread manish.baphna at citi dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81232

Bug ID: 81232
   Summary: compiler crashes for template function overload
   Product: gcc
   Version: 6.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manish.baphna at citi dot com
  Target Milestone: ---

Created attachment 41636
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41636=edit
diagnostic output from compiler

I am trying to use template function overloads and in a specific case, I was
expecting to deploy 'best match' overload but that somehow is not happening.
Template type deduction there is not matching 'best match' and compiler is
crashing(gcc6.1). Explicitly specifying types is helping here. Check main for
both versions of my usage. At this moment I am not sure if it's issue with gcc
or with my assumptions. Here is code

#include 
#include 

using namespace std;

template 
using int_ = integral_constant;

struct Meta
{
template static constexpr T ipow(T x)
{
return ipow(x, int_<(N < 0) ? -1 : N>());
}

template static constexpr T ipow(T x, int_<-1>)
{
return static_cast(1) / ipow<-N>(x, int_<-N>());
}

template static constexpr T ipow(T x, int_)
{
return x * ipow(x, int_());
}

template static constexpr T ipow(T x, int_<0>)
{
return 1;
}
};


int main(){
Meta m1;
cout << m1.ipow<-1, int>(2, int_<-1>()) << endl; // This works fine 
cout << m1.ipow(2, int_<-1>()) << endl;  // This crashes compiler
}

[Bug ipa/53896] nonreturning function suggested as 'pure' candidate

2017-06-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53896

Martin Liška  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |INVALID

--- Comment #5 from Martin Liška  ---
Well, as I read documentation for the warning, I believe it's very precise:

```
Warn about functions that might be candidates for attributes "pure", "const" or
"noreturn".  The compiler only warns for functions visible in other compilation
units or (in the case of "pure" and "const") if it cannot prove that the
function returns normally.
```

That's exactly your case as the compiler can't prove that it does return.

[Bug middle-end/80775] [8 Regression] -O3 produces ice in group_case_labels_stmt

2017-06-27 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80775

Peter Bergner  changed:

   What|Removed |Added

 Status|REOPENED|WAITING

[Bug testsuite/81058] FAIL: gcc.target/i386/avx512bw-vpmovu?swb-1.c scan-assembler-times vpmovu?swb.*

2017-06-27 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81058

--- Comment #2 from Dominique d'Humieres  ---
The following patch fixes the failures

--- ../_clean/gcc/testsuite/gcc.target/i386/avx512bw-vpmovswb-1.c  
2017-06-08 15:14:40.0 +0200
+++ gcc/testsuite/gcc.target/i386/avx512bw-vpmovswb-1.c 2017-06-26
16:45:03.0 +0200
@@ -1,4 +1,4 @@
-/* { dg-do compile } */
+/* { dg-do compile { target nonpic } } */
 /* { dg-options "-mavx512bw -mavx512vl -O2" } */
 /* { dg-final { scan-assembler-times "vpmovswb\[
\\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
 /* { dg-final { scan-assembler-times "vpmovswb\[
\\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)"
1 } } */
--- ../_clean/gcc/testsuite/gcc.target/i386/avx512bw-vpmovuswb-1.c 
2017-06-08 15:14:40.0 +0200
+++ gcc/testsuite/gcc.target/i386/avx512bw-vpmovuswb-1.c2017-06-26
16:44:47.0 +0200
@@ -1,4 +1,4 @@
-/* { dg-do compile } */
+/* { dg-do compile { target nonpic } } */
 /* { dg-options "-mavx512bw -mavx512vl -O2" } */
 /* { dg-final { scan-assembler-times "vpmovuswb\[
\\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
 /* { dg-final { scan-assembler-times "vpmovuswb\[
\\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)"
1 } } */

[Bug c/81230] False -Wimplicit-fallthrough when case has braces

2017-06-27 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81230

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek  ---
I think this is a known issue, perhaps even documented.  //fallthrough only
works if the following token is "case" or "default".

[Bug bootstrap/81217] Makefile:22754: warning: overriding recipe for target 'profiledbootstrap'

2017-06-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81217

Martin Liška  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #3 from Martin Liška  ---
I've got patch for that, will send soon to mailing list.

[Bug c/81231] ICE with invalid argument to __atomic_*

2017-06-27 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81231

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-06-27
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
Mine.

[Bug c/81231] New: ICE with invalid argument to __atomic_*

2017-06-27 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81231

Bug ID: 81231
   Summary: ICE with invalid argument to __atomic_*
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

$ cat ice.c
enum E;

void
foo (void)
{
  __atomic_load_n ((enum E *) 0, 0);
  __atomic_load_n ((enum X *) 0, 0);
}

$ ./cc1 -quiet ice.c
ice.c: In function ‘foo’:
ice.c:6:26: internal compiler error: in tree_to_uhwi, at tree.c:7396
   __atomic_load_n ((enum E *) 0, 0);
  ^
0x127bb0c tree_to_uhwi(tree_node const*)
/home/marek/src/gcc/gcc/tree.c:7396
0x8869b6 sync_resolve_size
/home/marek/src/gcc/gcc/c-family/c-common.c:6491
0x887fc5 resolve_overloaded_builtin(unsigned int, tree_node*, vec*)
/home/marek/src/gcc/gcc/c-family/c-common.c:7195
0x7d4575 c_build_function_call_vec(unsigned int, vec, tree_node*, vec*, vec*)
/home/marek/src/gcc/gcc/c/c-typeck.c:3180
0x81b187 c_parser_postfix_expression_after_primary
/home/marek/src/gcc/gcc/c/c-parser.c:8509
0x81a8db c_parser_postfix_expression
/home/marek/src/gcc/gcc/c/c-parser.c:8322
0x8168b4 c_parser_unary_expression
/home/marek/src/gcc/gcc/c/c-parser.c:7135
0x815d2d c_parser_cast_expression
/home/marek/src/gcc/gcc/c/c-parser.c:6964
0x81442d c_parser_binary_expression
/home/marek/src/gcc/gcc/c/c-parser.c:6771
0x813ca5 c_parser_conditional_expression
/home/marek/src/gcc/gcc/c/c-parser.c:6512
0x8139b5 c_parser_expr_no_commas
/home/marek/src/gcc/gcc/c/c-parser.c:6429
0x81b973 c_parser_expression
/home/marek/src/gcc/gcc/c/c-parser.c:8660
0x81bbc8 c_parser_expression_conv
/home/marek/src/gcc/gcc/c/c-parser.c:8693
0x8114ed c_parser_statement_after_labels
/home/marek/src/gcc/gcc/c/c-parser.c:5414
0x810509 c_parser_compound_statement_nostart
/home/marek/src/gcc/gcc/c/c-parser.c:4926
0x80fee5 c_parser_compound_statement
/home/marek/src/gcc/gcc/c/c-parser.c:4759
0x80a7ed c_parser_declaration_or_fndef
/home/marek/src/gcc/gcc/c/c-parser.c:2127
0x808f89 c_parser_external_declaration
/home/marek/src/gcc/gcc/c/c-parser.c:1471
0x808add c_parser_translation_unit
/home/marek/src/gcc/gcc/c/c-parser.c:1351
0x83cbf8 c_parse_file()
/home/marek/src/gcc/gcc/c/c-parser.c:18168
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

  1   2   >