This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/65956] [5/6 Regression] Another ARM overaligned arg passing issue
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 30 Apr 2015 23:12:16 +0000
- Subject: [Bug target/65956] [5/6 Regression] Another ARM overaligned arg passing issue
- Auto-submitted: auto-generated
- References: <bug-65956-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65956
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Untested fix:
--- gcc/tree-sra.c.jj 2015-04-20 14:35:47.000000000 +0200
+++ gcc/tree-sra.c 2015-05-01 01:08:34.092636496 +0200
@@ -4427,7 +4427,11 @@ turn_representatives_into_adjustments (v
gcc_assert (repr->base == parm);
adj.base_index = index;
adj.base = repr->base;
- adj.type = repr->type;
+ /* Drop any special alignment on the type if it's not on the
+ main variant. This avoids issues with weirdo ABIs like
+ AAPCS. */
+ adj.type = build_qualified_type (TYPE_MAIN_VARIANT (repr->type),
+ TYPE_QUALS (repr->type));
adj.alias_ptr_type = reference_alias_ptr_type (repr->expr);
adj.offset = repr->offset;
adj.by_ref = (POINTER_TYPE_P (TREE_TYPE (repr->base))
Though, wonder how many workaround we'll need for this AAPCS bogosity :(.