From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D69F9394B013; Fri, 6 May 2022 11:08:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D69F9394B013 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/100786] [9 Regression] ICE: in fold_convert_loc with alias attribute and different types and different sizes Date: Fri, 06 May 2022 11:08:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.5 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 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: Fri, 06 May 2022 11:08:57 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100786 --- Comment #8 from CVS Commits --- The releases/gcc-9 branch has been updated by Richard Biener : https://gcc.gnu.org/g:fba3068ec155e4d9a3074d55d3c3b1111c0bcb84 commit r9-10041-gfba3068ec155e4d9a3074d55d3c3b1111c0bcb84 Author: Richard Biener Date: Thu Jan 20 14:25:51 2022 +0100 middle-end/100786 - constant folding from incompatible alias The following avoids us ICEing doing constant folding from variables with aliases of different types. The issue appears both in folding and CCP and FRE can do more fancy stuff to still constant fold cases where the load is smaller than the initializer so defer it to there. 2022-01-20 Richard Biener PR middle-end/100786 * gimple-fold.c (get_symbol_constant_value): Only return values of compatible type to the symbol. * gcc.dg/torture/pr100786.c: New testcase. (cherry picked from commit 5c12507f5d0bc080e4f346af99824e039236e61c)=