+2016-01-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/69483
+ * gimple-fold.c (canonicalize_constructor_val): Return NULL
+ if base has error_mark_node type.
+
2016-01-26 Christophe Lyon <christophe.lyon@linaro.org>
PR target/68620
+2016-01-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/69483
+ * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
+
2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR c/24293
while (c_parser_next_token_is_not (parser, CPP_EOF));
}
- for (unsigned i = 0; i < incomplete_record_decls.length (); ++i)
- {
- tree decl = incomplete_record_decls[i];
- if (DECL_SIZE (decl) == NULL_TREE && TREE_TYPE (decl) != error_mark_node)
- {
- error ("storage size of %q+D isn%'t known", decl);
- TREE_TYPE (decl) = error_mark_node;
- }
- }
+ unsigned int i;
+ tree decl;
+ FOR_EACH_VEC_ELT (incomplete_record_decls, i, decl)
+ if (DECL_SIZE (decl) == NULL_TREE && TREE_TYPE (decl) != error_mark_node)
+ {
+ error ("storage size of %q+D isn%'t known", decl);
+ TREE_TYPE (decl) = error_mark_node;
+ }
}
/* Parse an external declaration (C90 6.7, C99 6.9).
|| TREE_CODE (base) == FUNCTION_DECL)
&& !can_refer_decl_in_current_unit_p (base, from_decl))
return NULL_TREE;
+ if (TREE_TYPE (base) == error_mark_node)
+ return NULL_TREE;
if (TREE_CODE (base) == VAR_DECL)
TREE_ADDRESSABLE (base) = 1;
else if (TREE_CODE (base) == FUNCTION_DECL)
+2016-01-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/69483
+ * gcc.dg/pr69483.c: New test.
+ * g++.dg/opt/pr69483.C: New test.
+
2016-01-26 Christophe Lyon <christophe.lyon@linaro.org>
PR target/68620
--- /dev/null
+// PR tree-optimization/69483
+// { dg-do compile }
+
+struct T { struct S *a; };
+struct S b; // { dg-error "aggregate 'S b' has incomplete type and cannot be defined" }
+struct T c = { &b };
--- /dev/null
+/* PR tree-optimization/69483 */
+/* { dg-do compile } */
+
+struct T { struct S *a; };
+struct S b; /* { dg-error "storage size of 'b' isn't known" } */
+struct T c = { &b };