From mboxrd@z Thu Jan 1 00:00:00 1970 From: "John David Anglin" To: rth@redhat.com (Richard Henderson) Cc: gcc-patches@gcc.gnu.org Subject: Re: Enum related fixes for gcc build with native cc on vax ultrix Date: Sun, 04 Mar 2001 10:28:00 -0000 Message-id: <200103041828.NAA06459@hiauly1.hia.nrc.ca> References: <20010301175132.A28153@redhat.com> X-SW-Source: 2001-03/msg00180.html > > - result = purge_addressof_1 (&SET_DEST (x), insn, force, 1, ht); > > - result &= purge_addressof_1 (&SET_SRC (x), insn, force, 0, ht); > > - return result; > > + if (purge_addressof_1 (&SET_DEST (x), insn, force, 1, ht) == true > > + && purge_addressof_1 (&SET_SRC (x), insn, force, 0, ht) == true) > > + return true; > > + return false; > > Eh? Perhaps this gets fixed with Zack's boolean cleanup patch. On thinking more about the patch to function.c, this fix is less invasive. Bootstrap checked under i686 linux with no regressions. OK for the 3.0 branch? Dave -- J. David Anglin dave.anglin@nrc.ca National Research Council of Canada (613) 990-0752 (FAX: 952-6605) 2001-03-04 John David Anglin * function.c (purge_addressof_1): Change type of function purge_addressof_1 from boolean to int. Change local variable `result' to int, and false and true to 0 and 1, respectively. --- function.c.orig Sat Mar 3 14:06:57 2001 +++ function.c Sun Mar 4 12:03:57 2001 @@ -294,8 +294,8 @@ static void emit_return_into_block PARAMS ((basic_block, rtx)); #endif static void put_addressof_into_stack PARAMS ((rtx, struct hash_table *)); -static boolean purge_addressof_1 PARAMS ((rtx *, rtx, int, int, - struct hash_table *)); +static int purge_addressof_1 PARAMS ((rtx *, rtx, int, int, + struct hash_table *)); static void purge_single_hard_subreg_set PARAMS ((rtx)); #ifdef HAVE_epilogue static void keep_stack_depressed PARAMS ((rtx)); @@ -2969,7 +2969,7 @@ the stack. If the function returns FALSE then the replacement could not be made. */ -static boolean +static /* boolean */ int purge_addressof_1 (loc, insn, force, store, ht) rtx *loc; rtx insn; @@ -2980,14 +2980,14 @@ RTX_CODE code; int i, j; const char *fmt; - boolean result = true; + int /*boolean */ result = /* true */ 1; /* Re-start here to avoid recursion in common cases. */ restart: x = *loc; if (x == 0) - return true; + return 1; code = GET_CODE (x); @@ -3010,7 +3010,7 @@ if (validate_change (insn, loc, sub, 0) || validate_replace_rtx (x, sub, insn)) - return true; + return 1; start_sequence (); sub = force_operand (sub, NULL_RTX); @@ -3021,7 +3021,7 @@ insns = gen_sequence (); end_sequence (); emit_insn_before (insns, insn); - return true; + return 1; } else if (code == MEM && GET_CODE (XEXP (x, 0)) == ADDRESSOF && ! force) @@ -3055,7 +3055,7 @@ if (rtx_equal_p (x, XEXP (tem, 0))) { *loc = XEXP (XEXP (tem, 1), 0); - return true; + return 1; } /* See comment for purge_addressof_replacements. */ @@ -3095,7 +3095,7 @@ z = gen_lowpart (GET_MODE (x), z); *loc = z; - return true; + return 1; } /* Sometimes we may not be able to find the replacement. For @@ -3105,7 +3105,7 @@ generate an example of this siutation. Rather than complain we return false, which will prompt our caller to remove the offending note. */ - return false; + return /* false */ 0; } size_x = GET_MODE_BITSIZE (GET_MODE (x)); @@ -3191,7 +3191,7 @@ purge_bitfield_addressof_replacements)); /* We replaced with a reg -- all done. */ - return true; + return 1; } } @@ -3209,13 +3209,13 @@ if (rtx_equal_p (XEXP (x, 0), XEXP (tem, 0))) { XEXP (XEXP (tem, 1), 0) = sub; - return true; + return 1; } purge_addressof_replacements = gen_rtx (EXPR_LIST, VOIDmode, XEXP (x, 0), gen_rtx_EXPR_LIST (VOIDmode, sub, purge_addressof_replacements)); - return true; + return 1; } goto restart; } @@ -3226,7 +3226,7 @@ else if (code == ADDRESSOF) { put_addressof_into_stack (x, ht); - return true; + return 1; } else if (code == SET) {