- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I got a `segmentation fault` after compiling code below with icpc. However, clang++ and g++ compile it correctly.
// bug.cc #include <sstream> #include <string> thread_local extern std::stringstream foo; int main() { foo.str(std::string()); return 0; }
// lib.cc #include <sstream> thread_local std::stringstream foo;
Here's a screenshot while I'm reproducing the problem.
Source files and the log is attached. My OS is latest ArchLinux, and other OS information is shown on the screenshot.
- Tags:
- CC++
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Optimization
- Parallel Computing
- Vectorization
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel compiler version 18.0 doesn't support GCC 8.1. If you compile the test program on the system which had GCC 4.3 to 6.3 installed, then it should work.
Thanks,
Viet

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page