From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 629E9385841F; Thu, 24 Feb 2022 10:52:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 629E9385841F From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/104675] [9/10/11/12 Regression] ICE: in expand_expr_real_2, at expr.cc:9773 at -O with __real__ + __imag__ extraction Date: Thu, 24 Feb 2022 10:52:50 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_known_to_fail 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Feb 2022 10:52:50 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104675 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail|10.3.1, 11.2.1, 12.0, | |6.5.0, 7.5.0, 8.5.0, 9.4.1 | --- Comment #3 from Jakub Jelinek --- It isn't just that match.pd change though, consider: _Complex int foo (_Complex int a) { return (-1 + -1i) - a; } _Complex int bar (_Complex int a) { return - a - (1 + 1i); } _Complex int baz (_Complex int a) { _Complex int b =3D -1 + -1i; return b -= a; } _Complex int qux (_Complex int a) { _Complex int b =3D 1 + 1i; return - a -= b; } I think both: /* -A - 1 -> ~A */ (simplify (minus (convert? (negate @0)) integer_each_onep) (if (!TYPE_OVERFLOW_TRAPS (type) && tree_nop_conversion_p (type, TREE_TYPE (@0))) (bit_not (convert @0)))) /* -1 - A -> ~A */ (simplify (minus integer_all_onesp @0) (bit_not @0)) needs to punt for COMPLEX_TYPE.=