From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F09973856DCA; Fri, 14 Apr 2023 10:14:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F09973856DCA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681467287; bh=U4lyF3/SNXmgfPOIXfo37c6nYwm0c3SebSLAXiSalTM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=F8QRsD7Las2OZv9Z3GSjXyiZ87o+pVbLC/CMdmLP4xQqlJHHWw+D0avu02wSbefPZ 4wuDBHtWAItBiOxJ3MEqZcxkr4WnELfQrm8Q99JfnX/JXv/BqXLndkDKRSSJLg5Odw FpDgZZvJ6E36gy8iCSa8XsyTRD34UB13v83juDSM= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/109510] [13 Regression] bootstrap with Ada broken on aarch64 Date: Fri, 14 Apr 2023 10:14:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 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=3D109510 --- Comment #7 from Jakub Jelinek --- In patch form what I wrote above (completely untested): --- gcc/config/aarch64/aarch64.cc.jj 2023-04-14 09:15:08.470312336 +0200 +++ gcc/config/aarch64/aarch64.cc 2023-04-14 12:08:59.785137542 +0200 @@ -7459,6 +7459,8 @@ aarch64_vfp_is_call_candidate (cumulativ nregs, NULL, pcum->silent= _p); } +static HOST_WIDE_INT aarch64_simd_vector_alignment (const_tree); + /* Given MODE and TYPE of a function argument, return the alignment in bits. The idea is to suppress any stronger alignment requested by the user and opt for the natural alignment (specified in AAPCS64 \S @@ -7487,16 +7489,16 @@ aarch64_function_arg_alignment (machine_ { /* The ABI alignment is the natural alignment of the type, without any attributes applied. Normally this is the alignment of the - TYPE_MAIN_VARIANT, but not always; see PR108910 for a counterexamp= le. - For now we just handle the known exceptions explicitly. */ + TYPE_MAIN_VARIANT, but not always; see PR108910 for a + counterexample. */ + unsigned int ret; type =3D TYPE_MAIN_VARIANT (type); - if (POINTER_TYPE_P (type)) - { - gcc_assert (known_eq (POINTER_SIZE, GET_MODE_BITSIZE (mode))); - return POINTER_SIZE; - } - gcc_assert (!TYPE_USER_ALIGN (type)); - return TYPE_ALIGN (type); + if (VECTOR_TYPE_P (type)) + ret =3D aarch64_simd_vector_alignment (type); + else + ret =3D GET_MODE_ALIGNMENT (TYPE_MODE (type)); + gcc_assert (TYPE_USER_ALIGN (type) || ret =3D=3D TYPE_ALIGN (type)); + return ret; } if (TREE_CODE (type) =3D=3D ARRAY_TYPE)=