This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/41182] [4.5 Regression] Revision 145254 caused ICE: tree check: expected integer_cst, have nop_expr in tree_int_cst_lt, at tree.c:5259
- From: "jsm28 at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Oct 2009 00:33:03 -0000
- Subject: [Bug c/41182] [4.5 Regression] Revision 145254 caused ICE: tree check: expected integer_cst, have nop_expr in tree_int_cst_lt, at tree.c:5259
- References: <bug-41182-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #13 from jsm28 at gcc dot gnu dot org 2009-10-08 00:33 -------
Subject: Bug 41182
Author: jsm28
Date: Thu Oct 8 00:32:51 2009
New Revision: 152548
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152548
Log:
PR c/41182
* c-common.c (c_fully_fold_internal): Strip nops from the result
of recursive calls to c_fully_fold_internal.
(c_wrap_maybe_const): New.
(c_save_expr): Use c_wrap_maybe_const.
* c-common.h (c_wrap_maybe_const): Declare.
* c-typeck.c (build_conditional_expr, c_finish_stmt_expr,
build_binary_op): Use c_wrap_maybe_const.
testsuite:
* gcc.c-torture/compile/pr41182-1.c: New.
Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr41182-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-common.c
trunk/gcc/c-common.h
trunk/gcc/c-typeck.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41182