Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCC bug #1230

Open
pt13762104 opened this issue Aug 27, 2024 · 5 comments
Open

GCC bug #1230

pt13762104 opened this issue Aug 27, 2024 · 5 comments

Comments

@pt13762104
Copy link

pt13762104 commented Aug 27, 2024

When I want to use #pragma GCC target("arch=skylake,tune=native") on Library Checker, this happens:

In file included from /usr/local/include/c++/14.1.0/string:43,
                 from /usr/local/include/c++/14.1.0/bitset:52,
                 from /usr/local/include/c++/14.1.0/x86_64-linux-gnu/bits/stdc++.h:52,
                 from main.cpp:3:
/usr/local/include/c++/14.1.0/bits/allocator.h: In destructor 'constexpr std::__cxx11::basic_string<char>::_Alloc_hider::~_Alloc_hider()':
/usr/local/include/c++/14.1.0/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'constexpr std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = char]': target specific option mismatch
  182 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/local/include/c++/14.1.0/string:54:
/usr/local/include/c++/14.1.0/bits/basic_string.h:186:14: note: called from here
  186 |       struct _Alloc_hider : allocator_type // TODO check __is_final
      |              ^~~~~~~~~~~~

It seems like that GCC 14.2.1 fixed this issue, can you update GCC to the latest version? Thanks.
Update: #pragma GCC target("avx2,avx512f,avx512er,avx512pf,avx512cd,avx512vl,avx512bw,avx512dq") doesn't seem to work with 14.2.1 yet.

Repository owner deleted a comment Aug 27, 2024
Repository owner deleted a comment Aug 27, 2024
Repository owner deleted a comment Aug 27, 2024
@yosupo06
Copy link
Owner

Our judge server's CPU is AMD EPYC™ 7B13(c2d-highcpu-8), which doesn't support avx512. So we can't use avx512 things even if we upgrade GCC

@pt13762104
Copy link
Author

I provided it with the correct architecture (Zen 3), still CE: https://judge.yosupo.jp/submission/231492. If you can upgrade GCC, it's great.

@yosupo06
Copy link
Owner

yosupo06 commented Sep 4, 2024

Upgraded to GCC 14.2

@soumyadeep70
Copy link

Put your pragma after stl includes...specifically something like vector, then your program will compile . It's a weird GCC bug. Even though it may crash at runtime as server cpu doesn't support avx512.

@pt13762104
Copy link
Author

pt13762104 commented Sep 20, 2024

Can you update to GCC 14.3 when it's released, it should fix that bug. Also the info page should show compiler flags (like DMOJ-based judges,...) Edit: the langs.toml file contain the compiler flags, but I think it's better to show it directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@yosupo06 @soumyadeep70 @pt13762104 and others