Quantcast
Channel: Intel® Software - Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1175

Getting segmentation fault for no reason.

$
0
0

I am running on RHE6.7 which comes with gcc 4.4.7. My source code that requires c++11 compatible compiler, so I have downloaded gcc 4.8.2. I am able to compile with gcc 4.8.2 and run.

The Intel compiler completes without any error but when I run the output... I get a segmentation fault. I also get a segmentation fault if I compile HelloWorld.cpp (only when specifying version of 4.8.2), see below:

$ /opt/rh/devtoolset-2/root/usr/bin/g++ HelloWorld.cpp
$ ./a.out
Hello World!

$ icpc HelloWorld.cpp
$ ./a.out
Hello World!

$ icpc -gcc-name=/opt/rh/devtoolset-2/root/usr/bin/gcc HelloWorld.cpp
$ ./a.out
Segmentation fault

Does anyone know what I is happening or what I am doing wrong? Your help will be much appreciated.

Thread Topic: 

Help Me

Viewing all articles
Browse latest Browse all 1175

Trending Articles