re PR c/48742 (Internal error in gimplify_expr)

PR c/48742
	* c-typeck.c (build_binary_op): Don't wrap arguments if
	int_operands is true.

	* gcc.c-torture/compile/pr48742.c: New test.

From-SVN: r173011
This commit is contained in:
Jakub Jelinek 2011-04-27 09:04:25 +02:00 committed by Jakub Jelinek
parent a4bd198cee
commit 5c2f94b4f5
4 changed files with 27 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2011-04-27 Jakub Jelinek <jakub@redhat.com>
PR c/48742
* c-typeck.c (build_binary_op): Don't wrap arguments if
int_operands is true.
2011-04-26 Kaz Kojima <kkojima@gcc.gnu.org>
PR target/48767

View File

@ -10190,7 +10190,7 @@ build_binary_op (location_t location, enum tree_code code,
warn_for_sign_compare (location, orig_op0_folded,
orig_op1_folded, op0, op1,
result_type, resultcode);
if (!in_late_binary_op)
if (!in_late_binary_op && !int_operands)
{
if (!op0_maybe_const || TREE_CODE (op0) != INTEGER_CST)
op0 = c_wrap_maybe_const (op0, !op0_maybe_const);

View File

@ -1,3 +1,8 @@
2011-04-27 Jakub Jelinek <jakub@redhat.com>
PR c/48742
* gcc.c-torture/compile/pr48742.c: New test.
2011-04-26 Jason Merrill <jason@redhat.com>
* g++.dg/lookup/koenig13.C: New.

View File

@ -0,0 +1,15 @@
/* PR c/48742 */
void baz (int);
int
foo (void)
{
return 1 / 0 > 0;
}
void
bar (void)
{
baz (1 <= 2 % (3 >> 1 > 5 / 6 == 3));
}