diff options
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index dd40ca00af8..05ee996a03b 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -617,7 +617,11 @@ layout_decl (tree decl, unsigned int known_align) if (DECL_MODE (decl) == VOIDmode) DECL_MODE (decl) = TYPE_MODE (type); - if (DECL_SIZE (decl) == 0) + if (lang_hooks.decls.layout_decl_p (decl, type)) + { + lang_hooks.decls.layout_decl (decl, type); + } + else if (DECL_SIZE (decl) == 0) { DECL_SIZE (decl) = TYPE_SIZE (type); DECL_SIZE_UNIT (decl) = TYPE_SIZE_UNIT (type); |