[Bug c++/107242] ICE: tree check: expected complex_cst, have plus_expr in output_constant, at varasm.cc:5284 with frounding-math
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Oct 14 07:24:56 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107242
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think that either the C++ frontend needs to reject this code or we need to
ignore -frounding-math in constant folding this (I think we do that elsewhere).
x86 is fine, presumambly because of ... !?
I get
struct cf test_comparison ()
{
struct cf D.2394;
const complex float a;
const complex float b;
a = __complex__ (2.2000000476837158203125e+0, 0.0);
b = __complex__ (4.400000095367431640625e+0, 0.0);
_1 = __complex__ (2.2000000476837158203125e+0, 0.0) + __complex__
(4.400000095367431640625e+0, 0.0);
D.2394._M_value = _1;
return D.2394;
}
More information about the Gcc-bugs
mailing list