Quantcast
Channel: Intel® Software - Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1175

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

$
0
0

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;
}
$

 


Viewing all articles
Browse latest Browse all 1175

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>