Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
39 Views

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

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
Highlighted
Employee
39 Views

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

0 Kudos
Highlighted
Beginner
39 Views

Thank you, Igor. 

0 Kudos