This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/48685] [4.5/4.6/4.7 regression] ICE in gimplify_expr, at gimplify.c:7034


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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]