Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Zhendong_Su
Beginner
89 Views

icc 17.0.1 miscompiles valid C code (compiled code segfaults) at -Os and above on x86_64-linux-gnu

Compiler version and platform: 

Intel(R) C Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 17.0.1.132 Build 20161005 

$ cat small.c
struct
{
  int f0:24;
  volatile int f1;
} a = {-8, 0}, c[1];

volatile int b, g, i = -8;
int d, h;
unsigned int e;

int main ()
{
  if (!(d < 1 && a.f0 > b))
    g = a.f0;
  a.f0 = a.f0 && h;
  e = g - 5;
  b = i % e; 
  if (b < d)
    c[120].f1;
  if (h)
    while (1)
      ;
  return 0; 
}
$ 

 

0 Kudos
0 Replies
Reply