This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/48685] [4.5/4.6/4.7 regression] ICE in gimplify_expr, at gimplify.c:7034
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 22 Apr 2011 11:43:43 +0000
- Subject: [Bug c/48685] [4.5/4.6/4.7 regression] ICE in gimplify_expr, at gimplify.c:7034
- Auto-submitted: auto-generated
- References: <bug-48685-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48685
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-04-22 11:42:59 UTC ---
The NON_LVALUE_EXPR in question is created by the C FE, in build_c_cast:
4712 /* Don't let a cast be an lvalue. */
4713 if (value == expr)
4714 value = non_lvalue_loc (loc, value);
And it has void_type_node like its argument, which is void_type_node COND_EXPR.
The second argument of the COND_EXPR is void_type_node also, but the third is
a MODIFY_EXPR and for MODIFY_EXPR fold_convert_loc just refuses to convert it:
2030 case VOID_TYPE:
2031 tem = fold_ignored_result (arg);
2032 if (TREE_CODE (tem) == MODIFY_EXPR)
2033 goto fold_convert_exit;
2034 return fold_build1_loc (loc, NOP_EXPR, type, tem);