aboutsummaryrefslogtreecommitdiff
path: root/gcc
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
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')
-rw-r--r--gcc/c-family/ChangeLog6
-rw-r--r--gcc/c-family/c-common.c3
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/torture/pr67581.C6
4 files changed, 19 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;
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index d58666e..a4419b8 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-11-29 Jan Hubicka <hubicka@ucw.cz>
+
+ PR c/67581
+ * g++.dg/torture/pr67581.C: New testcase.
+
2015-11-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/68559
diff --git a/gcc/testsuite/g++.dg/torture/pr67581.C b/gcc/testsuite/g++.dg/torture/pr67581.C
new file mode 100644
index 0000000..8089c1f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr67581.C
@@ -0,0 +1,6 @@
+/* { dg-do compile } */
+union U
+{
+ int x;
+ float y;
+} __attribute__ ((__transparent_union__));