This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH]: error with gcc-2.8.1, loop-invariant.c:1126: macro `DF_REG_SIZE' used without args
- From: "Kaveh R. GHAZI" <ghazi at caip dot rutgers dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 17 Aug 2007 12:32:20 -0400 (EDT)
- Subject: [PATCH]: error with gcc-2.8.1, loop-invariant.c:1126: macro `DF_REG_SIZE' used without args
I had to use a gcc-2.8.1 binary that came with gnat on solaris to try out
bootstrapping ada. When bootstrapping mainline, it complains about this
in stage1:
loop-invariant.c:1126: macro `DF_REG_SIZE' used without args
make[2]: *** [loop-invariant.o] Error 1
The argument to the macro DF_REG_SIZE is a placebo, it's never used.
Nevertheless all other uses of it pass in 'df' so I did it here also. This
regression appeared to have been installed during the dataflow branch
merge:
http://gcc.gnu.org/viewcvs/trunk/gcc/loop-invariant.c?r1=124639&r2=125624
Therefore older release branches are not affected, only mainline needs a
fix.
Patch below allows bootstrap of mainline to proceed using gcc-2.8.1.
Okay for the trunk?
Thanks,
--Kaveh
2007-08-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* loop-invariant.c (find_invariants_to_move): Add missing macro
argument.
diff -rup orig/egcc-SVN20070817/gcc/loop-invariant.c egcc-SVN20070817/gcc/loop-invariant.c
--- orig/egcc-SVN20070817/gcc/loop-invariant.c 2007-07-26 23:04:01.000000000 -0400
+++ egcc-SVN20070817/gcc/loop-invariant.c 2007-08-17 12:22:35.193662226 -0400
@@ -1123,7 +1123,7 @@ find_invariants_to_move (void)
{
unsigned i, regs_used, regs_needed = 0, new_regs;
struct invariant *inv = NULL;
- unsigned int n_regs = DF_REG_SIZE ();
+ unsigned int n_regs = DF_REG_SIZE (df);
if (!VEC_length (invariant_p, invariants))
return;