Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

icc 17.0.0 crashes on valid C code at -O3 on x86_64-linux-gnu (segfault)

Zhendong_Su
Beginner
578 Views

Compiler version and platform: 

Intel(R) C Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 17.0.0.098 Build 20160721

$ icc -O2 small.c
$ ./a.out
$ 
$ icc -O3 small.c
": internal error: ** The compiler has encountered an unexpected problem.
** Segmentation violation signal raised. **
Access violation or stack overflow. Please contact Intel Support for assistance.

compilation aborted for small.c (code 4)
$ 
$ cat small.c
#include <assert.h>

int a, b, c, d, e;

void fn1 ()
{
  for (; a;)
    {
      b = 0;
      b = ~(~b | e);
      for (c = 0; c < 2; c++)
        {
          assert (d);
          if (b)
            break;
        }
    }
}

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

 

0 Kudos
2 Replies
Igor_V_Intel
Employee
578 Views

I reproduced this bug and escalated (DPD200415552). Should be fixed in the upcoming updates.

0 Kudos
Zhendong_Su
Beginner
578 Views

Thank you, Igor. 

0 Kudos
Reply