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.