This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/59891] [4.7/4.8/4.9 Regression] ICE on invalid code (with div-by-zero) at all optimization levels on x86_64-linux-gnu
- 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: Tue, 21 Jan 2014 18:14:34 +0000
- Subject: [Bug c/59891] [4.7/4.8/4.9 Regression] ICE on invalid code (with div-by-zero) at all optimization levels on x86_64-linux-gnu
- Auto-submitted: auto-generated
- References: <bug-59891-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59891
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Because the C_MAYBE_CONST_EXPR has been added again in:
4576 if (!op2_maybe_const || TREE_CODE (op2) != INTEGER_CST)
4577 op2 = c_wrap_maybe_const (op2, !op2_maybe_const);
around the TRUNC_MOD_EXPR, then
4680 op1 = ep_convert_and_check (result_type, op1, semantic_result_type);
4681 op2 = ep_convert_and_check (result_type, op2, semantic_result_type);
converted the int type C_MAYBE_CONST_EXPR to unsigned int type (i.e. added
NOP_EXPR around it), and then the remove_c_maybe_const_expr in:
4709 if (int_operands)
4710 {
4711 op1 = remove_c_maybe_const_expr (op1);
4712 op2 = remove_c_maybe_const_expr (op2);
4713 }
4714 ret = build3 (COND_EXPR, result_type, ifexp, op1, op2);
4715 if (int_operands)
4716 ret = note_integer_operands (ret);
doesn't do anything anymore, since it only looks at toplevel
C_MAYBE_CONST_EXPR, not embedded in some NOP_EXPR.