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 middle-end/80422] New: ICE on valid code at -O3 in 32-bit mode on x86_64-linux-gnu: in operator[], at vec.h:732


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

            Bug ID: 80422
           Summary: ICE on valid code at -O3 in 32-bit mode on
                    x86_64-linux-gnu: in operator[], at vec.h:732
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

This seems to be a very recent regression. 


$ 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.1/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.1 20170414 (experimental) [trunk revision 246923] (GCC)
$
$ gcc-trunk -m32 -O2 small.c
$
$ gcc-trunk -m32 -O3 small.c
small.c: In function ‘fn2’:
small.c:19:1: internal compiler error: in operator[], at vec.h:732
 }
 ^
0x12f1017 vec<edge_def*, va_gc, vl_embed>::operator[](unsigned int)
        ../../gcc-source-trunk/gcc/vec.h:732
0x12f46fe vec<edge_def*, va_gc, vl_embed>::operator[](unsigned int)
        ../../gcc-source-trunk/gcc/cfgcleanup.c:1635
0x12f46fe single_pred_edge
        ../../gcc-source-trunk/gcc/basic-block.h:362
0x12f46fe try_crossjump_to_edge
        ../../gcc-source-trunk/gcc/cfgcleanup.c:1979
0x12f4c16 try_crossjump_bb
        ../../gcc-source-trunk/gcc/cfgcleanup.c:2328
0x12f50fa try_optimize_cfg
        ../../gcc-source-trunk/gcc/cfgcleanup.c:3001
0x12f50fa cleanup_cfg(int)
        ../../gcc-source-trunk/gcc/cfgcleanup.c:3204
0x12f6d28 execute
        ../../gcc-source-trunk/gcc/cfgcleanup.c:3333
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
$


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


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

int fn1 (int h)
{ 
  return a > 2 || h > a ? h : h << a;
}

void fn2 ()
{ 
  int j, k;
  while (1)
    { 
      k = c && b;
      f &= e > (fn1 (k) && j);
      if (!d)
        break;
    }
}

int main ()
{ 
  fn2 ();
  return 0;
}

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