Quantcast
Channel: Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1616

floating point exception

$
0
0

The attached very simple program crashed when compiled with icc (icc version 15.0.2 (gcc version 4.9.0 compatibility)), under Ubuntu 14.10.

Step to reproduce

  1. Download the attached source file bug.c
  2. Compile it: icc bug.c -o bug
  3. Execute it: bug
  4. Result:

0 1 -> 1
Floating point exception (core dumped)

When compiled with other compilers as gcc or clang, the program behaves as expected, without crashing. The source code does not contain any floating point variable.

--

Richard Delorme

 

 

 

 

AdjuntoTamaño
Descargarbug.c619 bytes

Viewing all articles
Browse latest Browse all 1616

Trending Articles