@@ -2706,6 +2706,11 @@ build_frame_type (tree ffi, FuncDeclaration *fd)
TREE_ADDRESSABLE (field) = TREE_ADDRESSABLE (vsym);
DECL_NONADDRESSABLE_P (field) = !TREE_ADDRESSABLE (vsym);
TREE_THIS_VOLATILE (field) = TREE_THIS_VOLATILE (vsym);
+ SET_DECL_ALIGN (field, DECL_ALIGN (vsym));
+
+ /* Update alignment for frame record type. */
+ if (TYPE_ALIGN (frame_rec_type) < DECL_ALIGN (field))
+ SET_TYPE_ALIGN (frame_rec_type, DECL_ALIGN (field));
if (DECL_LANG_NRVO (vsym))
{
new file mode 100644
@@ -0,0 +1,9 @@
+// { dg-do run }
+// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
+void main()
+{
+ align(128) byte var;
+ assert((cast(size_t) &var) % 128 == 0);
+ var = 73;
+ assert((() => var)() == 73);
+}