[Bug middle-end/16266] [4.0 regression] gcc.dg/c99-intconst-1.c compilation is very slow

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Oct 9 03:43:00 GMT 2004


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-09 03:43 -------
This patch should solve the problem, what I had said was a problem was not quite true.  The problem is 
that we were creating new temp slots level (which I said) but it was not an off by one error in the 
function which I said but one in temp_slots_at_level.
Index: function.c
===============================================================
====
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.581
diff -u -p -r1.581 function.c
--- function.c	8 Oct 2004 19:59:25 -0000	1.581
+++ function.c	9 Oct 2004 03:40:50 -0000
@@ -538,7 +538,7 @@ temp_slots_at_level (int level)
   if (!used_temp_slots)
     VARRAY_GENERIC_PTR_INIT (used_temp_slots, 3, "used_temp_slots");
 
-  while (level >= (int) VARRAY_ACTIVE_SIZE (used_temp_slots))
+  while (level > (int) VARRAY_ACTIVE_SIZE (used_temp_slots))
     VARRAY_PUSH_GENERIC_PTR (used_temp_slots, NULL);
 
   return (struct temp_slot **) &VARRAY_GENERIC_PTR (used_temp_slots, level);


I will post the patch after a test rule on powerpc-darwin.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16266



More information about the Gcc-bugs mailing list