From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EB2E5385483F; Fri, 14 Oct 2022 07:24:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EB2E5385483F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665732296; bh=vCS4N/LA6i0sO96aZl+vXHKaf5I8bm+wNIG8zXImlFs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nu6E1UYacAPL5Ipj7PGwj0TpX37ymMC8npRAp00dzO/Vklu+XX7tqFMvpRAuWCabv 7HjENYE7qPN9FHF7t3nD+WzvkuRiN0O0+Qat0XNPDvsGQgh7v7y5d4DgpoDwji2CAS uLz1TS1PakP2FJC1grT8SxpVn/5JZEYDNFwhZDzo= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107242] ICE: tree check: expected complex_cst, have plus_expr in output_constant, at varasm.cc:5284 with frounding-math Date: Fri, 14 Oct 2022 07:24:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107242 --- Comment #5 from Richard Biener --- 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 elsewhe= re). 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 =3D __complex__ (2.2000000476837158203125e+0, 0.0); b =3D __complex__ (4.400000095367431640625e+0, 0.0); _1 =3D __complex__ (2.2000000476837158203125e+0, 0.0) + __complex__ (4.400000095367431640625e+0, 0.0); D.2394._M_value =3D _1; return D.2394; }=