Commit 7063212f by Dodji Seketeli Committed by Dodji Seketeli

PR c++/51477 - ICE with invalid NSDMI

gcc/cp/

	PR c++/51477
	* search.c (lookup_member): Get out early on invalid base type.

gcc/testsuite/

	PR c++/51477
	* g++.dg/cpp0x/nsdmi6.C: New test.

From-SVN: r182474
parent fac665b2
2011-12-19 Dodji Seketeli <dodji@redhat.com>
PR c++/51477
* search.c (lookup_member): Get out early on invalid base type.
2011-12-19 Jason Merrill <jason@redhat.com>
PR c++/51489
......
......@@ -1171,7 +1171,9 @@ lookup_member (tree xbasetype, tree name, int protect, bool want_type,
const char *errstr = 0;
if (name == error_mark_node)
if (name == error_mark_node
|| xbasetype == NULL_TREE
|| xbasetype == error_mark_node)
return NULL_TREE;
gcc_assert (TREE_CODE (name) == IDENTIFIER_NODE);
......
2011-12-19 Dodji Seketeli <dodji@redhat.com>
PR c++/51477
* g++.dg/cpp0x/nsdmi6.C: New test.
2011-12-19 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/coarray_poly_3.f90: New.
......
// Origin PR c++/51477
// { dg-options "-std=c++11" }
struct A
{
typedef int int T; // { dg-error "two or more data types in declaration" }
struct T x[1] = { 0 }; // { dg-error "invalid|forward" }
};
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