[Bug c++/56895] [4.8/4.9 Regression] ICE: unexpected expression of kind arrow_expr
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 9 18:15:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56895
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-09 18:15:51 UTC ---
So:
@@ -4178,7 +4178,8 @@ cp_build_binary_op (location_t location,
}
else if (code0 == INTEGER_TYPE && code1 == INTEGER_TYPE)
{
- tree const_op1 = maybe_constant_value (op1);
+ tree const_op1 = fold_non_dependent_expr_sfinae (op1, tf_none);
+ const_op1 = maybe_constant_value (const_op1);
if (TREE_CODE (const_op1) != INTEGER_CST)
const_op1 = op1;
result_type = type0;
? Seems to work on this testcase.
More information about the Gcc-bugs
mailing list