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
This commit is contained in:
parent
fac665b24a
commit
7063212f9a
@ -1,3 +1,8 @@
|
||||
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);
|
||||
|
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
8
gcc/testsuite/g++.dg/cpp0x/nsdmi6.C
Normal file
8
gcc/testsuite/g++.dg/cpp0x/nsdmi6.C
Normal file
@ -0,0 +1,8 @@
|
||||
// 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" }
|
||||
};
|
Loading…
Reference in New Issue
Block a user