public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-109510-4-qPgZM8Z9YC@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109510-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109510

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
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 counterexample.
-        For now we just handle the known exceptions explicitly.  */
+        TYPE_MAIN_VARIANT, but not always; see PR108910 for a
+        counterexample.  */
+      unsigned int ret;
       type = 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 = aarch64_simd_vector_alignment (type);
+      else
+       ret = GET_MODE_ALIGNMENT (TYPE_MODE (type));
+      gcc_assert (TYPE_USER_ALIGN (type) || ret == TYPE_ALIGN (type));
+      return ret;
     }

   if (TREE_CODE (type) == ARRAY_TYPE)

  parent reply	other threads:[~2023-04-14 10:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-14  8:23 [Bug bootstrap/109510] New: " rguenth at gcc dot gnu.org
2023-04-14  8:24 ` [Bug bootstrap/109510] " rguenth at gcc dot gnu.org
2023-04-14  8:27 ` rguenth at gcc dot gnu.org
2023-04-14  9:04 ` ebotcazou at gcc dot gnu.org
2023-04-14  9:26 ` rguenth at gcc dot gnu.org
2023-04-14  9:27 ` rguenth at gcc dot gnu.org
2023-04-14  9:36 ` jakub at gcc dot gnu.org
2023-04-14  9:58 ` ebotcazou at gcc dot gnu.org
2023-04-14 10:14 ` jakub at gcc dot gnu.org [this message]
2023-04-14 10:34 ` rsandifo at gcc dot gnu.org
2023-04-14 10:40 ` ebotcazou at gcc dot gnu.org
2023-04-14 10:43 ` ebotcazou at gcc dot gnu.org
2023-04-14 11:39 ` rguenth at gcc dot gnu.org
2023-04-14 11:42 ` rsandifo at gcc dot gnu.org
2023-04-14 18:18 ` cvs-commit at gcc dot gnu.org
2023-04-14 18:19 ` ebotcazou at gcc dot gnu.org
2023-04-15 17:39 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-109510-4-qPgZM8Z9YC@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).