Commit adce5cdf by Jason Merrill Committed by Jason Merrill

re PR c++/57041 (ICE in lookup_field_1, at cp/search.c:376 (with dot-prefixed…

re PR c++/57041 (ICE in lookup_field_1, at cp/search.c:376 (with dot-prefixed structure initialisation))

	PR c++/57041
	* pt.c (tsubst_copy_and_build): Don't recur into a designator.

From-SVN: r198887
parent fc7721ee
2013-05-14 Jason Merrill <jason@redhat.com>
PR c++/57041
* pt.c (tsubst_copy_and_build): Don't recur into a designator.
2013-05-14 Paolo Carlini <paolo.carlini@oracle.com> 2013-05-14 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53903 PR c++/53903
......
...@@ -14401,7 +14401,10 @@ tsubst_copy_and_build (tree t, ...@@ -14401,7 +14401,10 @@ tsubst_copy_and_build (tree t,
newlen = vec_safe_length (n); newlen = vec_safe_length (n);
FOR_EACH_VEC_SAFE_ELT (n, idx, ce) FOR_EACH_VEC_SAFE_ELT (n, idx, ce)
{ {
if (ce->index && process_index_p) if (ce->index && process_index_p
/* An identifier index is looked up in the type
being initialized, not the current scope. */
&& TREE_CODE (ce->index) != IDENTIFIER_NODE)
ce->index = RECUR (ce->index); ce->index = RECUR (ce->index);
if (PACK_EXPANSION_P (ce->value)) if (PACK_EXPANSION_P (ce->value))
......
// PR c++/57041 // PR c++/57041
// { dg-options "-std=gnu++11" } // { dg-options "-std=gnu++11" }
// { dg-prune-output "error:" }
template<typename T> template<typename T>
union u { union u {
......
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