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

forcing gcc Og optimization via pragma triggers a compiler bug #4295

Closed
karna48 opened this issue Jan 8, 2025 · 4 comments
Closed

forcing gcc Og optimization via pragma triggers a compiler bug #4295

karna48 opened this issue Jan 8, 2025 · 4 comments

Comments

@karna48
Copy link

karna48 commented Jan 8, 2025

In my project, I have to set compiler options differently for fmt because just using "g++ -g" triggers a compiler bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118315

I have tested for GCC 12.2.0, 13.3.0 and 14.2.

It is related to issue and commit:
#2193

35c71ff

@vitaut
Copy link
Contributor

vitaut commented Jan 8, 2025

Could you provide a godbolt repro?

@karna48
Copy link
Author

karna48 commented Jan 8, 2025

there it is: https://godbolt.org/z/35Y8GWx3z

@vitaut
Copy link
Contributor

vitaut commented Jan 8, 2025

Thanks for the repro. A simple workaround would be to only enable optimization if FMT_MODULE is not defined - a PR would be welcome.

@vitaut
Copy link
Contributor

vitaut commented Jan 12, 2025

Worked around in c43da35. Thanks for reporting!

@vitaut vitaut closed this as completed Jan 12, 2025
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

2 participants