[Bug ipa/83051] New: ICE on valid code at -O3: in edge_badness, at ipa-inline.c:1024

su at cs dot ucdavis.edu gcc-bugzilla@gcc.gnu.org
Sun Nov 19 18:09:00 GMT 2017


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

            Bug ID: 83051
           Summary: ICE on valid code at -O3: in edge_badness, at
                    ipa-inline.c:1024
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

$ gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/home/su/software/tmp/gcc/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/8.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/home/su/software/tmp/gcc/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 8.0.0 20171119 (experimental) [trunk revision 254924] (GCC)
$
$ gcctk -O2 small.c
$ gcc-7.2.0 -O3 small.c
$
$ gcctk -O3 small.c
during IPA pass: inline
small.c:30:1: internal compiler error: in edge_badness, at ipa-inline.c:1024
 }
 ^
0x1471968 edge_badness
        ../../gcc-source-trunk/gcc/ipa-inline.c:1023
0x1471e69 update_edge_key
        ../../gcc-source-trunk/gcc/ipa-inline.c:1223
0x147236e update_caller_keys
        ../../gcc-source-trunk/gcc/ipa-inline.c:1345
0x1474709 inline_small_functions
        ../../gcc-source-trunk/gcc/ipa-inline.c:2051
0x1474709 ipa_inline
        ../../gcc-source-trunk/gcc/ipa-inline.c:2442
0x1474709 execute
        ../../gcc-source-trunk/gcc/ipa-inline.c:2849
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[1], b, c, d, e, f, g, h;

void fn1 (int p)
{ 
  b = b >> 8 ^ a[b ^ (c & 5)] >> 8 ^ a[(b ^ c) & 5];
  b = b >> 8 ^ a[(b ^ c) & 5];
}

static void fn2 ()
{ 
  int k;
  while (1)
    while (e)
      { 
        while (g)
          while (h)
            for (k = 0; k < 6; k++)
              while (f)
                fn1 (0);
        fn1 (0);
        fn1 (0);
        fn1 (0);
      }
}

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


More information about the Gcc-bugs mailing list