This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] rename nan in reg-stack.c


I was looking through bugs which have not been touch for the last
90 days and I came a crossed this bug, PR 14171.  There was a
variable named nan which is a C99 math function and was causing
bootstrap with --enable-intermodule to fail (yes I know it is
disabled for now).
So this patch renames the variable to not_a_num which fixes this
bug, the C front-end bug is filed in PR 12336.

OK? Bootstrapped on i686-pc-linux-gnu with no regressions.

Thanks,
Andrew Pinski

ChangeLog:
	* reg-stack.c (nan): Rename to ...
	(not_a_num): Here.
	(reg_to_stack): Rename nan to not_a_num.
	(subst_stack_regs_pat): Likewise.
	(convert_regs_entry): Likewise.
	(convert_regs_1): Likewise.

Patch:
Index: reg-stack.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reg-stack.c,v
retrieving revision 1.154
diff -u -p -r1.154 reg-stack.c
--- reg-stack.c	15 May 2004 09:39:29 -0000	1.154
+++ reg-stack.c	19 May 2004 20:06:16 -0000
@@ -232,7 +232,7 @@ static rtx
   (FP_mode_reg[(regno)-FIRST_STACK_REG][(int) (mode)])

 /* Used to initialize uninitialized registers.  */
-static rtx nan;
+static rtx not_a_num;

/* Forward declarations */

@@ -472,11 +472,11 @@ reg_to_stack (FILE *file)
      on zero, which we can get from `ldz'.  */

   if (flag_pic)
-    nan = CONST0_RTX (SFmode);
+    not_a_num = CONST0_RTX (SFmode);
   else
     {
-      nan = gen_lowpart (SFmode, GEN_INT (0x7fc00000));
-      nan = force_const_mem (SFmode, nan);
+      not_a_num = gen_lowpart (SFmode, GEN_INT (0x7fc00000));
+      not_a_num = force_const_mem (SFmode, not_a_num);
     }

/* Allocate a cache for stack_regs_mentioned. */
@@ -1499,7 +1499,7 @@ subst_stack_regs_pat (rtx insn, stack re
{
pat = gen_rtx_SET (VOIDmode,
FP_MODE_REG (REGNO (*dest), SFmode),
- nan);
+ not_a_num);
PATTERN (insn) = pat;
control_flow_insn_deleted |= move_for_stack_reg (insn, regstack, pat);
}
@@ -1508,7 +1508,7 @@ subst_stack_regs_pat (rtx insn, stack re
{
pat = gen_rtx_SET (VOIDmode,
FP_MODE_REG (REGNO (*dest) + 1, SFmode),
- nan);
+ not_a_num);
PATTERN (insn) = pat;
control_flow_insn_deleted |= move_for_stack_reg (insn, regstack, pat);
}
@@ -2597,7 +2597,7 @@ convert_regs_entry (void)


 	    init = gen_rtx_SET (VOIDmode,
 				FP_MODE_REG (FIRST_STACK_REG, SFmode),
-				nan);
+				not_a_num);
 	    insert_insn_on_edge (init, e);
 	    inserted = 1;
 	  }
@@ -2915,7 +2915,7 @@ convert_regs_1 (FILE *file, basic_block
 	    }

 	  set = gen_rtx_SET (VOIDmode, FP_MODE_REG (reg, SFmode),
-			     nan);
+			     not_a_num);
 	  insn = emit_insn_after (set, insn);
 	  control_flow_insn_deleted |= subst_stack_regs (insn, &regstack);
 	}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]