- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
The following program fails with " double free or corruption" error. I believe it is a compiler bug. Could someone please have a look at it.
icpc version 14.0.1 (gcc version 4.7.0 compatibility)
icpc -std=c++11 -O2 -g streamtest.cpp
#include <iostream> #include <stdio.h> #include <sstream> struct Path { Path() { _host = "host"; _dir = "dir"; _file = "file"; } std::string host() { return _host; } std::string path() { std::string ret = host() + _dir + _file; return ret; } private: std::string _dir; std::string _file; std::string _host; }; int main () { Path path; std::string p = path.path(); return 0;
}
- Tags:
- CC++
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Optimization
- Parallel Computing
- Vectorization
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't have a machine with GCC 4.7 installed, but I could reproduce it with GCC 4.8.1
vahoang@orcsle100:/tmp$ icpc -std=c++11 -O2 -g t.cpp -V
Intel(R) C++ Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.1.106 Build 20131008
Edison Design Group C/C++ Front End, version 4.6 (Oct 8 2013 19:20:39)
Copyright 1988-2013 Edison Design Group, Inc.
GNU ld version 2.20.51.0.2-5.11.el6 20091009
vahoang@orcsle100:/tmp$ gcc -v
gcc version 4.8.1 (GCC)
vahoang@orcsle100:/tmp$
Secondly, we are no longer supported Intel compiler version 14.0.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry for the typo. "could" where I meant "could not".

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