diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-05 17:34:29 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-05 17:34:29 +0000 |
commit | d8828f5588041b10e148608e265e4fcc54e05f7c (patch) | |
tree | 0336b82d2cbcc343230684b1de3dc6ab352f23af /gcc/c-decl.c | |
parent | 5ea0188d78d9e10b5365b8f5f6be2f3470153ef4 (diff) | |
download | gcc-d8828f5588041b10e148608e265e4fcc54e05f7c.tar.gz |
PR c/22308
* c-decl.c (finish_struct): Also copy C_TYPE_FIELDS_READONLY,
C_TYPE_FIELDS_VOLATILE and C_TYPE_VARIABLE_SIZE to type variants.
testsuite:
* gcc.dg/pr22308-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101629 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 3c241fe6af9..23ff373ed0d 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -5420,6 +5420,9 @@ finish_struct (tree t, tree fieldlist, tree attributes) TYPE_LANG_SPECIFIC (x) = TYPE_LANG_SPECIFIC (t); TYPE_ALIGN (x) = TYPE_ALIGN (t); TYPE_USER_ALIGN (x) = TYPE_USER_ALIGN (t); + C_TYPE_FIELDS_READONLY (x) = C_TYPE_FIELDS_READONLY (t); + C_TYPE_FIELDS_VOLATILE (x) = C_TYPE_FIELDS_VOLATILE (t); + C_TYPE_VARIABLE_SIZE (x) = C_TYPE_VARIABLE_SIZE (t); } /* If this was supposed to be a transparent union, but we can't |