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

Test 'compile-fp-test' compilation fails on gcc 11 and clang 14 #2886

Closed
jrmelsha opened this issue May 9, 2022 · 3 comments
Closed

Test 'compile-fp-test' compilation fails on gcc 11 and clang 14 #2886

jrmelsha opened this issue May 9, 2022 · 3 comments

Comments

@jrmelsha
Copy link

jrmelsha commented May 9, 2022

if (is_constant_evaluated()) return !isnan(value - value);

error: ‘(+Inf - +Inf)’ is not a constant expression

Fails with both c++20 and gnu++20.

I will look into an equivalent constant evaluated expression.

@vitaut
Copy link
Contributor

vitaut commented May 9, 2022

I was not able to reproduce the issue in https://godbolt.org/z/f57vqYeGf. Could you provide a godbolt repro?

@jrmelsha
Copy link
Author

jrmelsha commented May 9, 2022

https://godbolt.org/z/qeo5bjbxT

Was due to -O3

@vitaut
Copy link
Contributor

vitaut commented May 11, 2022

Worked around in ae963e4, thanks for reporting!

@vitaut vitaut closed this as completed May 11, 2022
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