https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110675
Bug ID: 110675
Summary: Compilation fails for a simple C++ program
Product: gcc
Version: 13.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc.gnu.org at aryanc403 dot com
Target Milestone: ---
Created attachment 55549
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55549&action=edit
All files (.cpp, .ii, .s) inclusing logs.zip
Code
```
#pragma GCC target ("avx2")
#include <set>
int main(void) {
std::set<int> s;
return 0;
}
```
Compilation command -
```
g++ -static -std=c++20 a.cpp
```
Expected behaviour - Program compiles successfully.
Actual behaviour - Program fails to compile.
Compiler logs (Detailed logs attached) -
```
/usr/include/c++/13.1.1/bits/allocator.h: In destructor ‘constexpr
std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>,
std::allocator<int> >::_Rb_tree_impl<std::less<int>, true>::~_Rb_tree_impl()’:
/usr/include/c++/13.1.1/bits/allocator.h:184:7: error: inlining failed in call
to ‘always_inline’ ‘constexpr std::allocator< <template-parameter-1-1>
>::~allocator() noexcept [with _Tp = std::_Rb_tree_node<int>]’: target specific
option mismatch
184 | ~allocator() _GLIBCXX_NOTHROW { }
| ^
/usr/include/c++/13.1.1/bits/stl_tree.h:662:16: note: called from here
662 | struct _Rb_tree_impl
```
System - Arch Linux (fully updated 2-3 days ago)