This is the mail archive of the gcc-bugs@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]

Re: optimization/10684: register variable update disappears when using -O


Synopsis: register variable update disappears when using -O

State-Changed-From-To: open->analyzed
State-Changed-By: cae
State-Changed-When: Thu May  8 18:52:25 2003
State-Changed-Why:
    Confirmed, still present in 3.4-cvs. This is a reduced testcase:
    
    register int STACK __asm__("%ebx");
    static void (*p) ();
    void f ()
    {
            STACK += 1;
            p ();
            STACK -= 1;
    }
    
    Looking at the assembly shows that STACK += 1 ist lost if compiled
    with -O. The problem seems to be that life analysis adds a REG_DEAD
    note to the call to (*p) which makes STACK += 1 a dead store.
    
       regards  Christian
    

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


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