[Bug c/67106] [6 Regression] ICE: verify_type failed: type variant differs by TYPE_PACKED. with -g -fpack-struct
hubicka at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Nov 26 06:17:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67106
Jan Hubicka <hubicka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |hubicka at gcc dot gnu.org
--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Actually in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66325 I already went
for variant walk. Will thus test:
Index: c/c-decl.c
===================================================================
--- c/c-decl.c (revision 230924)
+++ c/c-decl.c (working copy)
@@ -7213,7 +7213,8 @@ start_struct (location_t loc, enum tree_
}
C_TYPE_BEING_DEFINED (ref) = 1;
- TYPE_PACKED (ref) = flag_pack_struct;
+ for (tree v = TYPE_MAIN_VARIANT (ref); v; v = TYPE_NEXT_VARIANT (v))
+ TYPE_PACKED (v) = flag_pack_struct;
*enclosing_struct_parse_info = struct_parse_info;
struct_parse_info = XNEW (struct c_struct_parse_info);
Index: testsuite/gcc.c-torture/compile/pr67106.c
===================================================================
--- testsuite/gcc.c-torture/compile/pr67106.c (revision 0)
+++ testsuite/gcc.c-torture/compile/pr67106.c (revision 0)
@@ -0,0 +1,12 @@
+/* { dg-options "-g -fpack-struct" } */
+typedef struct S S;
+
+struct S
+{
+ struct
+ {
+ S *s;
+ };
+ int a;
+};
+
More information about the Gcc-bugs
mailing list