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/6673: gcc-3.1 produces wrong assembly code


Synopsis: gcc-3.1 produces wrong assembly code

State-Changed-From-To: open->feedback
State-Changed-By: jakub
State-Changed-When: Thu May 16 06:40:11 2002
State-Changed-Why:
    Why do you think this is wrong?
    If there is no volatile, there is nothing which prevents
    gcc e.g. with ++a; ++a; ++a to do all the additions at
    once and store just the final result. Similarly with your
    testcase, gcc does all additions together and stores the
    end result after all infinity iterations. Since the loop
    will never finish, gcc can as well optimize the final
    store out.

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


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