Intel® C++ Compiler

Intel C++ Compiler 16.0 is now available in Intel Parallel Studio XE 2016

The new version Intel C++ Compiler 16.0 is now available in Intel Parallel Studio XE 2016 that has launched early this week. If your support license is current you can download and install this at no additional charge from the Intel Registration Center

You will find some blog postings about some new features and new free tools.

Оптимизировали, оптимизировали, да не выоптимизировали!

Оптимизация? Конечно, каждый сталкивался с данной задачей при разработке своих, сколь-нибудь значительных, требующих определённых вычислений, приложений. При этом способов оптимизировать код существует огромное множество, и, как следствие, различных путей сделать это в автоматическом режиме с помощью опций компилятора. Вот здесь и возникает проблема – как выбрать то, что нужно нам и не запутаться?

Window x64 17.0.1 compiler, Visual Studio 2015, and std::list checked iterators issue

I have encountered a number of mysterious crashes on Windows x64 using 17.0.1 in _DEBUG mode only. In _DEBUG mode on Windows, various STL functions are validated using what are called "checked iterators"

 

Here is my sample test program. To reproduce, create a Visual C++ 2015 console project, and run in x64|Debug mode.

icc 17.0.1 crashes on valid C++ code on x86_64-linux-gnu (Segmentation violation signal raised)

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 

$ g++ -c small.cpp
$ clang++ -c small.cpp
$ 
$ icc -c small.cpp
": 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.cpp (code 4)
$ 
$ cat small.cpp
struct S
{
  S () {}
  S (const S &) {}
};

S foo ()
{
  return ({ S (); });
}
$ 

 

icc 17.0.1 miscompiles valid C code at -O2 (only) on x86_64-linux-gnu

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

 

icc 17.0.1 miscompiles valid C code at all optimization levels (including -O0) on x86_64-linux-gnu

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 

$ gcc -O0 small.c; ./a.out
$ clang -O0 small.c; ./a.out
$ 
$ icc -O0 small.c
$ timeout -s 9 10 ./a.out
Killed
$ 
$ cat small.c
int main ()
{
  goto L1;
  if (0) {
  L2:
    ;
  }
  else {
  L1:
    goto L2;
  }
  return 0; 
}
$ 

 

Subscribe to Intel® C++ Compiler