diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2016-06-15 15:23:40 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2016-06-15 15:23:40 +0000 |
commit | b8911cb870585c08881d3c424cb1e508e99b9ace (patch) | |
tree | 89a4417c638d49e00e1541ed152672f46de1394d /gcc/cp/parser.c | |
parent | 75dc52c674f0d70ae8cca6b0381270b3efd3a0fb (diff) | |
download | gcc-b8911cb870585c08881d3c424cb1e508e99b9ace.zip gcc-b8911cb870585c08881d3c424cb1e508e99b9ace.tar.gz gcc-b8911cb870585c08881d3c424cb1e508e99b9ace.tar.bz2 |
re PR c++/70202 (ICE on invalid code on x86_64-linux-gnu in build_simple_base_path, at cp/class.c:579)
/cp
2016-06-15 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/70202
* decl.c (xref_basetypes): Revert r117839 changes; add fix-up
code at the end of the for loop; also revert r159637 changes,
add back the gcc_assert.
* cp-tree.h (xref_basetypes): Adjust declaration.
* parser.c (cp_parser_class_head): Adjust xref_basetypes call.
/testsuite
2016-06-15 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/70202
* g++.dg/inherit/crash6.C: New.
* g++.dg/inherit/union2.C: Likewise.
* g++.dg/inherit/virtual12.C: Likewise.
* g++.dg/inherit/virtual13.C: Likewise.
* g++.dg/inherit/virtual1.C: Tweak dg-* tests.
From-SVN: r237482
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 632b25f..a9c636b 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -22050,9 +22050,8 @@ cp_parser_class_head (cp_parser* parser, /* If we're really defining a class, process the base classes. If they're invalid, fail. */ - if (type && cp_lexer_next_token_is (parser->lexer, CPP_OPEN_BRACE) - && !xref_basetypes (type, bases)) - type = NULL_TREE; + if (type && cp_lexer_next_token_is (parser->lexer, CPP_OPEN_BRACE)) + xref_basetypes (type, bases); done: /* Leave the scope given by the nested-name-specifier. We will |