===================================================================
@@ -1,3 +1,9 @@
+2015-10-26 Jim Wilson <jim.wilson@linaro.org>
+
+ PR debug/66068
+ * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
+ after calling build_qualified_type.
+
2015-10-22 Richard Biener <rguenther@suse.de>
* c-typeck.c (c_finish_omp_clauses): Properly convert operands
===================================================================
@@ -13090,6 +13090,8 @@ c_finish_transaction (location_t loc, tree block,
tree
c_build_qualified_type (tree type, int type_quals)
{
+ tree var_type;
+
if (type == error_mark_node)
return type;
@@ -13146,7 +13148,13 @@ c_build_qualified_type (tree type, int type_quals)
type_quals &= ~TYPE_QUAL_RESTRICT;
}
- return build_qualified_type (type, type_quals);
+ var_type = build_qualified_type (type, type_quals);
+ /* A variant type does not inherit the list of incomplete vars from the
+ type main variant. */
+ if (TREE_CODE (var_type) == RECORD_TYPE
+ || TREE_CODE (var_type) == UNION_TYPE)
+ C_TYPE_INCOMPLETE_VARS (var_type) = 0;
+ return var_type;
}
/* Build a VA_ARG_EXPR for the C parser. */
===================================================================
@@ -1,3 +1,8 @@
+2015-10-26 Jim Wilson <jim.wilson@linaro.org>
+
+ PR debug/66068
+ * gcc.dg/debug/pr66068.c: New test.
+
2015-10-26 Louis Krupp <louis.krupp@zoho.com>
PR fortran/66056
===================================================================
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+
+struct S a;
+const struct S b;
+struct S
+{
+};
+
+union U c;
+const union U d;
+union U
+{
+};