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

icc 17.0.0 crashes on valid C++ code on x86_64-linux-gnu (internal error: assertion failed at: "shared/cfe/edgcpfe/interpret.c")

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

The code compiles successfully with -std=c++11, but crashes the compiler with -std=c++14. 

$ icc -c -std=c++11 small.cpp
$
$ g++-6.2 -c -std=c++14 small.cpp
$ clang++-3.8 -c -std=c++14 small.cpp
$
$ icc -c -std=c++14 small.cpp
small.cpp(9): internal error: assertion failed at: "shared/cfe/edgcpfe/interpret.c", line 3438

  } b (&b.v[1]);
       ^

compilation aborted for small.cpp (code 4)
$
$ cat small.cpp
struct A
{ 
  int v[2];
};

struct B : A
{ 
  constexpr B (int *p) : A () {}
} b (&b.v[1]);

$

 

0 Kudos
2 Replies
Igor_V_Intel
Employee
147 Views

I reproduced this bug with 17.0 Update 1 as well:

$ icc -c -std=c++14 test.cpp
test.cpp(9): internal error: assertion failed at: "shared/cfe/edgcpfe/interpret.c", line 3444

  } b (&b.v[1]);
       ^

$ icc -V
Intel(R) C Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 17.0.1.132 Build 20161005
Copyright (C) 1985-2016 Intel Corporation.  All rights reserved.
 

I will escalate this to the developers to fix it.

Igor_V_Intel
Employee
147 Views

DPD200415968 is for your reference.

Reply