diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2011-07-25 15:29:13 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2011-07-25 15:29:13 +0000 |
commit | c1703fc185b118903740257c9a8cd6e06fd562f1 (patch) | |
tree | ecb50074ee1739f8bed318cbc90b450c1c3e8faa /gcc/cp/parser.c | |
parent | c2d8a62e2debedf777e53e2206c0a818707571ac (diff) | |
download | gcc-c1703fc185b118903740257c9a8cd6e06fd562f1.zip gcc-c1703fc185b118903740257c9a8cd6e06fd562f1.tar.gz gcc-c1703fc185b118903740257c9a8cd6e06fd562f1.tar.bz2 |
re PR c++/49838 ([C++0x] ICE in cp_parser_perform_range_for_lookup, at cp/parser.c:8796)
/cp
2011-07-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/49838
* parser.c (cp_parser_perform_range_for_lookup): Early return if
error_operand_p (range).
/testsuite
2011-07-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/49838
* g++.dg/cpp0x/range-for19.C: New.
From-SVN: r176754
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 4e7d905..c687a34 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -8795,6 +8795,9 @@ cp_convert_range_for (tree statement, tree range_decl, tree range_expr) static tree cp_parser_perform_range_for_lookup (tree range, tree *begin, tree *end) { + if (error_operand_p (range)) + return error_mark_node; + if (!COMPLETE_TYPE_P (complete_type (TREE_TYPE (range)))) { error ("range-based %<for%> expression of type %qT " |