From 4d84fe7ceeda4dfa363b4cfe273db99003b87abe Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 8 Apr 2009 15:11:46 +0100 Subject: re PR middle-end/39614 (Internal error compiling CSiBE) PR c/39614 PR c/39673 * c-common.h (C_MAYBE_CONST_EXPR_PRE, C_MAYBE_CONST_EXPR_EXPR, C_MAYBE_CONST_EXPR_INT_OPERANDS, C_MAYBE_CONST_EXPR_NON_CONST, EXPR_INT_CONST_OPERANDS): Remove duplicate definitions. * c-convert.c (convert): Do not call fold on results of conversion functions when the result is a C_MAYBE_CONST_EXPR. * c-parser.c (c_parser_postfix_expression): Do not fold condition of __builtin_choose_expr. * c-typeck.c (remove_c_maybe_const_expr): New. (build_unary_op, build_conditional_expr, build_compound_expr, build_binary_op, c_objc_common_truthvalue_conversion): Call remove_c_maybe_const_expr on any input C_MAYBE_CONST_EXPR with integer operands. testsuite: * gcc.c-torture/compile/pr39614-1.c, gcc.c-torture/compile/pr39614-2.c, gcc.c-torture/compile/pr39614-3.c, gcc.c-torture/compile/pr39614-4.c, gcc.c-torture/compile/pr39614-5.c, gcc.c-torture/compile/pr39673-1.c, gcc.c-torture/compile/pr39673-2.c: New tests. * gcc.dg/gnu89-const-expr-2.c, gcc.dg/gnu99-const-expr-2.c: Test more cases. * gcc.dg/overflow-warn-1.c, gcc.dg/overflow-warn-2.c, gcc.dg/overflow-warn-3.c, gcc.dg/overflow-warn-4.c: Update expected errors. From-SVN: r145737 --- gcc/c-parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/c-parser.c') diff --git a/gcc/c-parser.c b/gcc/c-parser.c index 1be2ae5..d0b0d77 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -5403,7 +5403,7 @@ c_parser_postfix_expression (c_parser *parser) { tree c; - c = fold (e1.value); + c = e1.value; if (TREE_CODE (c) != INTEGER_CST || !INTEGRAL_TYPE_P (TREE_TYPE (c))) error_at (loc, -- cgit v1.1