PATCH: Fix initialization of const_int_rtx's

John David Anglin dave@hiauly1.hia.nrc.ca
Sun Jun 30 13:40:00 GMT 2002


The enclosed patch adds a missing cast in the gen_rtx_raw_CONST_INT call
in init_emit_once.  With this fix, it is now possible to bootstrap the
gcc 3.1 branch with the 64-bit HP native compiler (CC="cc +DA2.0W" without
ANSI compiler or CC="cc +DA2.0W -Ac -D_HPUX_SOURCE" with ANSI compiler
installed).

Tested on hppa64-hp-hpux11.11 and hppa64-hp-hpux11.00.

OK for main and 3.1 branch?

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

2002-06-30  John David Anglin  <dave@hiauly1.hia.nrc.ca>

	* emit-rtl.c (init_emit_once): Add missing cast to HOST_WIDE_INT.

Index: emit-rtl.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/emit-rtl.c,v
retrieving revision 1.249.2.9
diff -u -3 -p -r1.249.2.9 emit-rtl.c
--- emit-rtl.c	28 Jun 2002 12:36:04 -0000	1.249.2.9
+++ emit-rtl.c	30 Jun 2002 18:26:02 -0000
@@ -5037,7 +5037,7 @@ init_emit_once (line_numbers)
      tries to use these variables.  */
   for (i = - MAX_SAVED_CONST_INT; i <= MAX_SAVED_CONST_INT; i++)
     const_int_rtx[i + MAX_SAVED_CONST_INT] =
-      gen_rtx_raw_CONST_INT (VOIDmode, i);
+      gen_rtx_raw_CONST_INT (VOIDmode, (HOST_WIDE_INT) i);
   ggc_add_rtx_root (const_int_rtx, 2 * MAX_SAVED_CONST_INT + 1);
 
   if (STORE_FLAG_VALUE >= - MAX_SAVED_CONST_INT



More information about the Gcc-patches mailing list