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: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 22 Apr 2011 16:54:09 +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 #6 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2011-04-22 16:53:53 UTC ---
On Fri, 22 Apr 2011, jakub at gcc dot gnu.org wrote:
> 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);
I'd say that's a bug in fold_convert_loc; it should provide the interface
to the rest of the compiler that the return value always has the requested
type (or is error_mark_node).