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

icc 17.0.1 miscompiles valid C code at -O2 (only) 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 

$ icc -Os small.c; ./a.out
$ icc -O3 small.c; ./a.out
$
$ icc -O2 small.c
$ ./a.out
Segmentation fault (core dumped)
$
$ cat small.c
int a, *b, c, d;

int fn1 ()
{
  int e = 0;
  for (; e < 4; e++)
    if (d && *b)
      break;
  if (e & a)
    while (1)
      ;
  return c;
}

int main ()
{
  fn1 ();
  return 0;
}
$

 


Viewing all articles
Browse latest Browse all 1175

Trending Articles


FLASHBACK WITH SIRASA FM AT GALGAMUWA 2022


Mp3 Download: Mdu - Mazola


Imitation gun was fired at motorist in Leicester road-rage incident


Ndebele names


MCKINNEY EMALINE “EMMA” OF WES...


Okra & Motia — The Workshop (Prod by Hammer)


Skint TV teen to be sentenced


Moondru Mudichu 19-09-2017 – Polimer tv Serial


YOSVANI JAMES Arrested by Miami-Dade County Corrections on Jan 10, 2017


Stories • Goddess Stepmom



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