aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2015-11-29 20:48:45 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2015-11-29 19:48:45 +0000
commit75c8aac3cee7f1a7eda2c58f9b59ce4925509862 (patch)
treec620df6b9184101f5be4bb8599bdba16dc12c9f5 /gcc/c-family
parent7f091e1c5a1919da45cb80f7677c48649999abb1 (diff)
downloadgcc-75c8aac3cee7f1a7eda2c58f9b59ce4925509862.zip
gcc-75c8aac3cee7f1a7eda2c58f9b59ce4925509862.tar.gz
gcc-75c8aac3cee7f1a7eda2c58f9b59ce4925509862.tar.bz2
re PR c++/67581 (ICE on transparent union with -g enabled on x86_64-linux-gnu (verify_type failed))
PR c/67581 * g++.dg/torture/pr67581.C: New testcase. * c-family/c-common.c (handle_transparent_union_attribute): Update also type variants. From-SVN: r231048
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/ChangeLog6
-rw-r--r--gcc/c-family/c-common.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index ad0fbc1..f8fa0b2 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,9 @@
+2015-11-29 Jan Hubicka <hubicka@ucw.cz>
+
+ PR c/67581
+ * c-common.c (handle_transparent_union_attribute): Update
+ also type variants.
+
2015-11-27 Martin Liska <mliska@suse.cz>
PR c++/68312
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index fe0a235..369574f 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -7787,7 +7787,8 @@ handle_transparent_union_attribute (tree *node, tree name,
*node = type = build_duplicate_type (type);
}
- TYPE_TRANSPARENT_AGGR (type) = 1;
+ for (tree t = TYPE_MAIN_VARIANT (type); t; t = TYPE_NEXT_VARIANT (t))
+ TYPE_TRANSPARENT_AGGR (t) = 1;
return NULL_TREE;
}