alignment set on a renaming, assert that the renamed object is aligned
enough as to make it possible to honor it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182201
138bc75d-0d04-0410-961f-
82ee72b054a4
2011-12-11 Eric Botcazou <ebotcazou@adacore.com>
+ * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If there is an
+ alignment set on a renaming, assert that the renamed object is aligned
+ enough as to make it possible to honor it.
+
+2011-12-11 Eric Botcazou <ebotcazou@adacore.com>
+
* gcc-interface/trans.c (gigi): Initialize the linemap earlier.
2011-12-06 Dave Korn <dave.korn.cygwin@gmail.com>
saved = true;
annotate_object (gnat_entity, gnu_type, NULL_TREE,
false, false);
+ /* This assertion will fail if the renamed object
+ isn't aligned enough as to make it possible to
+ honor the alignment set on the renaming. */
+ if (align)
+ {
+ unsigned int renamed_align
+ = DECL_P (gnu_decl)
+ ? DECL_ALIGN (gnu_decl)
+ : TYPE_ALIGN (TREE_TYPE (gnu_decl));
+ gcc_assert (renamed_align >= align);
+ }
break;
}