optimization/8110: GCC 3.2: wrong code optimization with -O2

rth@gcc.gnu.org rth@gcc.gnu.org
Tue Oct 1 14:19:00 GMT 2002


Synopsis: GCC 3.2: wrong code optimization with -O2

State-Changed-From-To: open->closed
State-Changed-By: rth
State-Changed-When: Tue Oct  1 14:19:00 2002
State-Changed-Why:
    The code in rtx_alloc is broken in spec2k.  Use the following.
    
    --- rtl.c.orig  Tue Oct  1 14:16:34 2002
    +++ rtl.c       Tue Oct  1 14:17:35 2002
    @@ -234,9 +234,7 @@
          one int, but we don't want to assume that and it isn't very portable
          anyway; this is.  */
     
    -  length = (sizeof (struct rtx_def) - sizeof (rtunion) - 1) / sizeof (int);
    -  for (; length >= 0; length--)
    -    ((int *) rt)[length] = 0;
    +  memset (rt, 0, sizeof (struct rtx_def) - sizeof (rtunion));
     
       PUT_CODE (rt, code);
     

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8110



More information about the Gcc-bugs mailing list