Commit b95a64bb by Jakub Jelinek Committed by Jakub Jelinek

re PR c/72816 (ICE on x86_64-linux-gnu (tree check: expected tree that contains…

re PR c/72816 (ICE on x86_64-linux-gnu (tree check: expected tree that contains ‘decl with RTL’ structure, have ‘field_decl’ in set_decl_rtl, at emit-rtl.c:1282))

	PR c/72816
	* c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
	array member through typedef, for orig_qual_indirect == 0 clear
	orig_qual_type.

	* gcc.dg/pr72816.c: New test.

From-SVN: r239371
parent 68a51b68
2016-08-11 Jakub Jelinek <jakub@redhat.com>
PR c/72816
* c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
array member through typedef, for orig_qual_indirect == 0 clear
orig_qual_type.
2016-08-08 David Malcolm <dmalcolm@redhat.com> 2016-08-08 David Malcolm <dmalcolm@redhat.com>
PR c/64955 PR c/64955
......
...@@ -6710,6 +6710,8 @@ grokdeclarator (const struct c_declarator *declarator, ...@@ -6710,6 +6710,8 @@ grokdeclarator (const struct c_declarator *declarator,
type = build_distinct_type_copy (TYPE_MAIN_VARIANT (type)); type = build_distinct_type_copy (TYPE_MAIN_VARIANT (type));
TYPE_DOMAIN (type) = build_range_type (sizetype, size_zero_node, TYPE_DOMAIN (type) = build_range_type (sizetype, size_zero_node,
NULL_TREE); NULL_TREE);
if (orig_qual_indirect == 0)
orig_qual_type = NULL_TREE;
} }
type = c_build_qualified_type (type, type_quals, orig_qual_type, type = c_build_qualified_type (type, type_quals, orig_qual_type,
orig_qual_indirect); orig_qual_indirect);
......
2016-08-11 Jakub Jelinek <jakub@redhat.com>
PR c/72816
* gcc.dg/pr72816.c: New test.
2016-08-11 Bernd Edlinger <bernd.edlinger@hotmail.de> 2016-08-11 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR tree-optimization/71083 PR tree-optimization/71083
......
...@@ -5,5 +5,5 @@ ...@@ -5,5 +5,5 @@
typedef const int A[]; typedef const int A[];
struct S { struct S {
int a; int a;
A b; /* { dg-error "array size missing" } */ A b;
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment