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

IntelC++ failed to compile thread_local extern std::stringstream::str(std::string) correctly

$
0
0

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.

AttachmentSize
Downloadapplication/x-gzipintel-err.tar.gz640.43 KB

Viewing all articles
Browse latest Browse all 1175

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>