On Tue, Sep 13, 2016 at 9:03 AM, Andreas Schwab <sch...@linux-m68k.org> wrote:
> On Sep 13 2016, Jason Merrill <ja...@redhat.com> wrote:
>
>> Does this help?
>
> Unfortunatly no.

It occurs to me that this function doesn't need to restrict types at
all.  I'm checking this in; hopefully it will do the trick.
commit 0f7f6249a4120620c7944d709691425f1c8c7a8b
Author: Jason Merrill <ja...@redhat.com>
Date:   Tue Sep 13 09:13:57 2016 -0400

            Trying again to fix aligned-new on m68k.
    
            * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
            limit types at all.

diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 9b5e016..9fec2cf 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -7905,13 +7905,8 @@ check_cxx_fundamental_alignment_constraints (tree node,
     }
   else if (TYPE_P (node))
     {
-      /* Let's be liberal for types.  BIGGEST_ALIGNMENT is the largest
-        alignment a built-in type can require, MAX_OFILE_ALIGNMENT is the
-        largest alignment the object file can represent, but a type that is
-        only allocated dynamically could request even larger alignment.  So
-        only limit type alignment to what TYPE_ALIGN can represent.  */
-      if (requested_alignment > (max_align = 8U << 28))
-       alignment_too_large_p = true;
+      /* Let's be liberal for types; don't limit their alignment any more than
+        check_user_alignment already did.  */
     }
 
   if (alignment_too_large_p)

Reply via email to