aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2016-06-15 15:23:40 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2016-06-15 15:23:40 +0000
commitb8911cb870585c08881d3c424cb1e508e99b9ace (patch)
tree89a4417c638d49e00e1541ed152672f46de1394d /gcc/cp/parser.c
parent75dc52c674f0d70ae8cca6b0381270b3efd3a0fb (diff)
downloadgcc-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.c5
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