Patchwork [committed] Fix bootstrap with 32-bit HWI (PR middle-end/59327)

login
register
mail settings
Submitter Jakub Jelinek
Date Nov. 28, 2013, 11:04 p.m.
Message ID <20131128230405.GU892@tucnak.redhat.com>
Download mbox | patch
Permalink /patch/295028/
State New
Headers show

Comments

Jakub Jelinek - Nov. 28, 2013, 11:04 p.m.
Hi!

With 32-bit HWI, we would get a -Wsign-compare warning here, this patch
fixes it.  Bootstrapped/regtested on x86_64-linux and i686-linux,
committed as obvious.

2013-11-28  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/59327
	* cfgexpand.c (expand_used_vars): Avoid warning on 32-bit
	HWI hosts.


	Jakub

Patch

--- gcc/cfgexpand.c.jj	2013-11-28 08:34:36.000000000 +0100
+++ gcc/cfgexpand.c	2013-11-28 12:40:44.969758239 +0100
@@ -1833,7 +1833,7 @@  expand_used_vars (void)
 	  sz = data.asan_vec[0] - prev_offset;
 	  if (data.asan_alignb > ASAN_RED_ZONE_SIZE
 	      && data.asan_alignb <= 4096
-	      && sz + ASAN_RED_ZONE_SIZE >= data.asan_alignb)
+	      && sz + ASAN_RED_ZONE_SIZE >= (int) data.asan_alignb)
 	    redzonesz = ((sz + ASAN_RED_ZONE_SIZE + data.asan_alignb - 1)
 			 & ~(data.asan_alignb - HOST_WIDE_INT_1)) - sz;
 	  offset