http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52639

--- Comment #5 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> 2012-04-24 
13:22:08 UTC ---
Same problem here under Debian/unstable (x86_64), with:

gcc-snapshot -O3 -march=native -std=gnu99 -c ice-setf.i

and the testcase below, using:

gcc (Debian 20120407-1) 4.8.0 20120407 (experimental) [trunk revision 186212]

Here's a simpler testcase:

// /usr/lib/gcc-snapshot/libexec/gcc/x86_64-linux-gnu/4.8.0/cc1 -fpreprocessed
ice-setf.i -march=corei7 -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mpopcnt
-mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm
-mno-avx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt --param l1-cache-size=32
--param l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=corei7 -quiet
-dumpbase ice-setf.i -auxbase ice-setf -O3 -std=gnu99 -o - -frandom-seed=0
# 1 "ice-setf.i"
int a(int *, unsigned long);
int g(unsigned long);
void r(int, long);

int foo(unsigned long sy, int *x, int i)
{
  unsigned long sx = x[0];
  if (sy <= sx)
    {
      unsigned long p = sx * 64;
      int m = 0;
      int tmp = i ? g(sx) : a(&m, sx);
      r(tmp, p);
    }
  return 0;
}

The ICE is reproducible with -O3, but not with -O2. Also note that this is C,
not C++.

Reply via email to