[Bug bootstrap/71292] Bootstrap failure with segfault in tree-reassoc.c

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

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #6 from Jakub Jelinek  ---
*** Bug 71299 has been marked as a duplicate of this bug. ***

[Bug bootstrap/71292] Bootstrap failure with segfault in tree-reassoc.c

2016-05-30 Thread kugan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71292

--- Comment #5 from kugan at gcc dot gnu.org ---
Author: kugan
Date: Mon May 30 10:47:57 2016
New Revision: 236876

URL: https://gcc.gnu.org/viewcvs?rev=236876=gcc=rev
Log:
gcc/testsuite/ChangeLog:

2016-05-30  Kugan Vivekanandarajah  

PR middle-end/71269
PR middle-end/71292
* gcc.dg/tree-ssa/pr71269.c: New test.
* gcc.dg/tree-ssa/pr71292.c: New test.

gcc/ChangeLog:

2016-05-30  Kugan Vivekanandarajah  

PR middle-end/71269
PR middle-end/71252
* tree-ssa-reassoc.c (insert_stmt_before_use): Use find_insert_point so
that inserted stmt will not dominate stmts that defines its operand.
(rewrite_expr_tree): Add stmt_to_insert before adding the use stmt.
(rewrite_expr_tree_parallel): Likewise.


Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr71269.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr71292.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-reassoc.c

[Bug bootstrap/71292] Bootstrap failure with segfault in tree-reassoc.c

2016-05-27 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71292

--- Comment #4 from ktkachov at gcc dot gnu.org ---
The patch fixes that ICE in the testcase for me.
Thanks!

[Bug bootstrap/71292] Bootstrap failure with segfault in tree-reassoc.c

2016-05-26 Thread kugan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71292

kugan at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #3 from kugan at gcc dot gnu.org ---
Dup of PR71252

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

[Bug bootstrap/71292] Bootstrap failure with segfault in tree-reassoc.c

2016-05-26 Thread kugan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71292

--- Comment #2 from kugan at gcc dot gnu.org ---
(In reply to kugan from comment #1)
> (In reply to ktkachov from comment #0)
> > An aarch64-none-linux-gnu bootstrap with an in-tree mpfr fails with an ICE:
> > exp_2.i: In function ‘fn1’:
> > exp_2.i:4:6: internal compiler error: Segmentation fault
> >  void fn1() {
> >   ^~~
> > 0xb1f8cf crash_signal
> > $SRC/gcc/toplev.c:333
> > 0x89bcb9 bb_seq_addr
> > $SRC/gcc/gimple.h:1655
> > 0x89bcb9 gsi_start_bb
> > $SRC/gcc/gimple-iterator.h:129
> > 0x89bcb9 gsi_for_stmt(gimple*)
> > $SRC/gcc/gimple-iterator.c:617
> > 0xcbbeba insert_stmt_after
> > $SRC/gcc/tree-ssa-reassoc.c:1323
> > 0xcbd67a build_and_add_sum
> > $SRC/gcc/tree-ssa-reassoc.c:1392
> > 0xcbf34f rewrite_expr_tree_parallel
> > $SRC/gcc/tree-ssa-reassoc.c:4128
> > 0xcc8b95 reassociate_bb
> > $SRC/gcc/tree-ssa-reassoc.c:5339
> > 0xcc8ad7 reassociate_bb
> > $SRC/gcc/tree-ssa-reassoc.c:5391
> > 0xccb523 do_reassoc
> > $SRC/gcc/tree-ssa-reassoc.c:5505
> > 0xccb523 execute_reassoc
> > $SRC/gcc/tree-ssa-reassoc.c:5592
> > 0xccb523 execute
> > $SRC/gcc/tree-ssa-reassoc.c:5631
> > Please submit a full bug report,
> > with preprocessed source if appropriate.
> > Please include the complete backtrace with any bug report.
> > See  for instructions.
> > 
> > The reduced testcase for that reproducible with trunk at:
> > gcc version 7.0.0 20160526 
> > is:
> > 
> > unsigned long a;
> > long b, d;
> > int c;
> > void fn1() {
> >   unsigned long e = a + c;
> >   b = d + e + a + 8;
> > }
> > 
> > compile with -O2.
> > Compiling with -fno-tree-reassoc doesn't ICE
> 
> It looks like dup of PR71252.
> 
> does the patch at help? 
> https://gcc.gnu.org/ml/gcc-patches/2016-05/msg02076.html

I can reproduce the error. With the patch from
https://gcc.gnu.org/ml/gcc-patches/2016-05/msg02076.html, I can bootstrap.
Please let me know if you still have any problem with the patch.

[Bug bootstrap/71292] Bootstrap failure with segfault in tree-reassoc.c

2016-05-26 Thread kugan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71292

--- Comment #1 from kugan at gcc dot gnu.org ---
(In reply to ktkachov from comment #0)
> An aarch64-none-linux-gnu bootstrap with an in-tree mpfr fails with an ICE:
> exp_2.i: In function ‘fn1’:
> exp_2.i:4:6: internal compiler error: Segmentation fault
>  void fn1() {
>   ^~~
> 0xb1f8cf crash_signal
> $SRC/gcc/toplev.c:333
> 0x89bcb9 bb_seq_addr
> $SRC/gcc/gimple.h:1655
> 0x89bcb9 gsi_start_bb
> $SRC/gcc/gimple-iterator.h:129
> 0x89bcb9 gsi_for_stmt(gimple*)
> $SRC/gcc/gimple-iterator.c:617
> 0xcbbeba insert_stmt_after
> $SRC/gcc/tree-ssa-reassoc.c:1323
> 0xcbd67a build_and_add_sum
> $SRC/gcc/tree-ssa-reassoc.c:1392
> 0xcbf34f rewrite_expr_tree_parallel
> $SRC/gcc/tree-ssa-reassoc.c:4128
> 0xcc8b95 reassociate_bb
> $SRC/gcc/tree-ssa-reassoc.c:5339
> 0xcc8ad7 reassociate_bb
> $SRC/gcc/tree-ssa-reassoc.c:5391
> 0xccb523 do_reassoc
> $SRC/gcc/tree-ssa-reassoc.c:5505
> 0xccb523 execute_reassoc
> $SRC/gcc/tree-ssa-reassoc.c:5592
> 0xccb523 execute
> $SRC/gcc/tree-ssa-reassoc.c:5631
> Please submit a full bug report,
> with preprocessed source if appropriate.
> Please include the complete backtrace with any bug report.
> See  for instructions.
> 
> The reduced testcase for that reproducible with trunk at:
> gcc version 7.0.0 20160526 
> is:
> 
> unsigned long a;
> long b, d;
> int c;
> void fn1() {
>   unsigned long e = a + c;
>   b = d + e + a + 8;
> }
> 
> compile with -O2.
> Compiling with -fno-tree-reassoc doesn't ICE

It looks like dup of PR71252.

does the patch at help? 
https://gcc.gnu.org/ml/gcc-patches/2016-05/msg02076.html

[Bug bootstrap/71292] Bootstrap failure with segfault in tree-reassoc.c

2016-05-26 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71292

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P1
  Known to work||6.1.0
   Target Milestone|--- |7.0
  Known to fail||7.0