https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71352

            Bug ID: 71352
           Summary: ICE at -O1 and above on x86_64-linux-gnu: in
                    zero_one_operation, at tree-ssa-reassoc.c:1251
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

The following code causes an ICE when compiled with the current gcc trunk at
-O1 and above on x86_64-linux-gnu in both 32-bit and 64-bit modes.

It is a regression from 6.1.x. 

This may be related to PR 71230 and PR 71263, but they have been fixed. 


$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 7.0.0 20160530 (experimental) [trunk revision 236873] (GCC) 
$ 
$ gcc-trunk -O0 -c small.c
$ gcc-6.1 -O1 -c small.c
$ 
$ gcc-trunk -O1 -c small.c
small.c: In function ‘fn1’:
small.c:4:1: internal compiler error: in zero_one_operation, at
tree-ssa-reassoc.c:1251
 fn1 ()
 ^~~
0xd6d0de zero_one_operation
        ../../gcc-source-trunk/gcc/tree-ssa-reassoc.c:1250
0xd755b2 undistribute_ops_list
        ../../gcc-source-trunk/gcc/tree-ssa-reassoc.c:1604
0xd762a8 reassociate_bb
        ../../gcc-source-trunk/gcc/tree-ssa-reassoc.c:5261
0xd75dc7 reassociate_bb
        ../../gcc-source-trunk/gcc/tree-ssa-reassoc.c:5391
0xd78943 do_reassoc
        ../../gcc-source-trunk/gcc/tree-ssa-reassoc.c:5505
0xd78943 execute_reassoc
        ../../gcc-source-trunk/gcc/tree-ssa-reassoc.c:5592
0xd78943 execute
        ../../gcc-source-trunk/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 <http://gcc.gnu.org/bugs.html> for instructions.
$ 


--------------------------------


unsigned a, b, c, d, e;

void
fn1 ()
{
  unsigned f;
  e = f = d * -b + a * -c;
}

Reply via email to