Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
7783 Discussions

Bug with std::stringstream inside a lambda and #pragma optimize("", off)

User87135761
Beginner
635 Views

Hi, it looks like I came across a compiler bug.

The following example seg faults on intel c++ 2018.5.274 on Linux:

#pragma optimize(""off) // it doesn't crash without this line
#include <sstream>

int main() {
    [] { std::stringstream{}; }();
}
 
compile with: icc -o main main.cpp
Using CentOS7
0 Kudos
4 Replies
User87135761
Beginner
629 Views

I forgot to mention that it happens on Linux (CentOS7) but not on Windows 10.

I edited my post.

Gopika_Intel
Moderator
602 Views

Hi,

Thank you for reaching out. We were able to reproduce the issue. We’re looking into it and will get back to you.

Regards

Gopika


Viet_H_Intel
Moderator
387 Views

Not sure if you already knew, but Intel Classic Compiler will enter "Legacy Product Support" mode, signaling the end of regular updates. Please refer to the article bellow for more details.

https://www.intel.com/content/www/us/en/developer/articles/technical/adoption-of-llvm-complete-icx.h...


For that reason, Developer isn't plan to to fix this in Classic compiler. Can you migrate to icx/icpx? and let us know if we could close this case?


Thanks,

Viet


Viet_H_Intel
Moderator
375 Views

Please migrate to icx. We are going to close this as won't fix in C++ Classic compiler. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel. 


Thanks,



Reply