This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/70986] New: ICE on valid code at -O3 on x86_64-linux-gnu in combine_blocks, at tree-if-conv.c:2219


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

            Bug ID: 70986
           Summary: ICE on valid code at -O3 on x86_64-linux-gnu in
                    combine_blocks, at tree-if-conv.c:2219
           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
-O3 on x86_64-linux-gnu in both 32-bit and 64-bit modes.


$ 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 20160506 (experimental) [trunk revision 235952] (GCC) 
$ 
$ gcc-trunk -O2 -c small.c
$ 
$ gcc-trunk -O3 -c small.c
small.c: In function âfn2â:
small.c:12:1: internal compiler error: in combine_blocks, at
tree-if-conv.c:2219
 fn2 ()
 ^~~
0xc1ffb7 combine_blocks
        ../../gcc-source-trunk/gcc/tree-if-conv.c:2219
0xc2264f tree_if_conversion
        ../../gcc-source-trunk/gcc/tree-if-conv.c:2741
0xc2264f execute
        ../../gcc-source-trunk/gcc/tree-if-conv.c:2829
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.
$ 


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


int a, g;
char b, c;
short d, e, f;

char
fn1 ()
{
  return a ? a : 1;
}

void
fn2 ()
{
  char h;
  for (; d;)
    for (; e; e++)
      c = (fn1 () && h) & !(f |= 9 ^ (b > (g = c)));
  for (;;)
    ;
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]