diff options
Diffstat (limited to 'gcc/d/decl.cc')
-rw-r--r-- | gcc/d/decl.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/d/decl.cc b/gcc/d/decl.cc index 9fcfc56..250d148 100644 --- a/gcc/d/decl.cc +++ b/gcc/d/decl.cc @@ -2393,6 +2393,12 @@ aggregate_initializer_decl (AggregateDeclaration *decl) SET_DECL_ALIGN (sinit, sd->alignment.get () * BITS_PER_UNIT); DECL_USER_ALIGN (sinit) = true; } + else if (sd == NULL) + { + /* Alignment of class is determined its biggest field alignment. */ + SET_DECL_ALIGN (sinit, decl->alignsize * BITS_PER_UNIT); + DECL_USER_ALIGN (sinit) = true; + } decl->sinit = sinit; return sinit; |