From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7C44E3853D32; Mon, 17 Apr 2023 13:41:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7C44E3853D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681738882; bh=7lhCyHSUjZOIMF50fnTHf1FKzr4rcQWPdwIOtDUMjEs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uuJaUpbtA20VJjsvQ3y2jnFQIzeQH322QcOnVN9GS85QXgShqQ4SljNgGk7XJZaY3 hw6obsu/gAX/uj/dOHsscXUJgiLnYw5mrIlrzxMYwgr/GGKrrFGzFPTzUsv5T60MBS cFum+MWI6VXc8LJX4fGe3hI7nAjNLa65t0qP6d0Q= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108910] [12 Regression] Further ICE in aarch64_layout_arg Date: Mon, 17 Apr 2023 13:41:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-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: P1 X-Bugzilla-Assigned-To: rsandifo at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 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=3D108910 --- Comment #19 from CVS Commits --- The releases/gcc-12 branch has been updated by Richard Sandiford : https://gcc.gnu.org/g:66700dde0dfb2c2b07d771f90df1fe16d1d61ce9 commit r12-9416-g66700dde0dfb2c2b07d771f90df1fe16d1d61ce9 Author: Richard Sandiford Date: Mon Apr 17 14:41:00 2023 +0100 aarch64: Don't trust TYPE_ALIGN for pointers [PR108910] The aarch64 PCS rules ignore user alignment for scalars and vectors and use the "natural" alignment of the type. GCC tried to calculate that natural alignment using: TYPE_ALIGN (TYPE_MAIN_VARIANT (type)) But as discussed in the PR, it's possible that the main variant of a pointer type is an overaligned type (although that's usually accidental). This isn't known to be a problem for other types, so this patch changes the bare minimum. It might be that we need to ignore TYPE_ALIGN in other cases too. gcc/ PR target/108910 * config/aarch64/aarch64.cc (aarch64_function_arg_alignment): Do not trust TYPE_ALIGN for pointer types; use POINTER_SIZE instea= d. gcc/testsuite/ PR target/108910 * gcc.dg/torture/pr108910.c: New test. (cherry picked from commit 66946624b96b762985de56444d726a0ebd4e0df5)=