Skip to content
Snippets Groups Projects
Commit a27d595d authored by Joseph Myers's avatar Joseph Myers Committed by Joseph Myers
Browse files

re PR c/54103 (ICE at gimplify.c:7790 on current trunk)

c:
	PR c/54103
	* c-typeck.c (build_unary_op): Pass original argument of
	TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
	any C_MAYBE_CONST_EXPR, if it has integer operands.
	(build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
	TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
	to c_objc_common_truthvalue_conversion, then remove any
	C_MAYBE_CONST_EXPR, if they have integer operands.  Use
	c_objc_common_truthvalue_conversion not
	c_common_truthvalue_conversion.
	(c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
	call note_integer_operands for arguments with integer operands
	that are not integer constants.

testsuite:
	* gcc.c-torture/compile/pr54103-1.c,
	gcc.c-torture/compile/pr54103-2.c,
	gcc.c-torture/compile/pr54103-3.c,
	gcc.c-torture/compile/pr54103-4.c,
	gcc.c-torture/compile/pr54103-5.c,
	gcc.c-torture/compile/pr54103-6.c: New tests.
	* gcc.dg/c90-const-expr-8.c: Update expected column number.

From-SVN: r191304
parent 937f6ef1
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment