This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/62201] New: ICE with -Wlogical-not-parentheses: tree check: expected class âexpressionâ, have âexceptionalâ
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 20 Aug 2014 10:41:12 +0000
- Subject: [Bug c++/62201] New: ICE with -Wlogical-not-parentheses: tree check: expected class âexpressionâ, have âexceptionalâ
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62201
Bug ID: 62201
Summary: ICE with -Wlogical-not-parentheses: tree check:
expected class âexpressionâ, have âexceptionalâ
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
CC: mpolacek at gcc dot gnu.org
The issue appeared using valid code; the delta reduced code fails the same way,
but is obviously invalid:
g++ -S -Wlogical-not-parentheses test8.ii
Test case:
------------------------------------
template<typename _Tp, _Tp __m, _Tp __a, _Tp __c, bool __big_enough =
(!(__m & (__m - 1)) || (_Tp(-1) - __c) / __a >= __m - 1),
bool __schrage_ok = __m % __a < __m / __a> struct _Mod {
------------------------------------
Error message:
test8.ii:1:142: internal compiler error: tree check: expected class
âexpressionâ, have âexceptionalâ (template_parm_index) in tree_operand_check,
at tree.h:3186
template<typename _Tp, _Tp __m, _Tp __a, _Tp __c, bool __big_enough
= (!(__m & (__m - 1)) || (_Tp(-1) - __c) / __a >= __m - 1),
bool __schrage_ok = __m % __a < __m / __a> struct _Mod {
^
0xe5b8b7 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
../../gcc/tree.c:9200
0x56dff7 expr_check(tree_node*, char const*, int, char const*)
../../gcc/tree.h:2898
0x56dff7 tree_operand_check(tree_node*, int, char const*, int, char const*)
../../gcc/tree.h:3186
0x6ec932 tree_operand_check(tree_node*, int, char const*, int, char const*)
../../gcc/tree.h:2932
0x6ec932 cp_parser_binary_expression
../../gcc/cp/parser.c:8130
0x6ec9cb cp_parser_assignment_expression
../../gcc/cp/parser.c:8271