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]

optimization/6647: -O2 (or above) invalid optimization



>Number:         6647
>Category:       optimization
>Synopsis:       -O2 (or above) invalid optimization
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 13 08:26:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Pascal Massimino
>Release:        2.96 -> 3.0.4
>Organization:
>Environment:
PIII mobile, linux, redhat 7.1
>Description:
Initialization of a 'float/double' variable occurs
after its address taken and derefenced.
Only occurs with -O2 or above.
>How-To-Repeat:
see attached file bug.cpp
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="bug.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bug.cpp"

Ly8KLy8gQnVnOiBnY2MgMi45NiAtPiAzLjAuNAovLyBQcm9jOiBJbnRlbChSKSBQZW50aXVtKFIp
IElJSSBNb2JpbGUgQ1BVCi8vIE9TOiBMaW51eCAgMi40LjE4LXByZTkgKGZyb20gUmVkaGF0IDcu
MSkKLy8KLy8gQ29tcGlsZWQgd2l0aCAtTywgdGhpcyBwcm9nZ3kgcnVucyBPay4KLy8gQ29tcGls
ZWQgd2l0aCAtTzIgb3IgYWJvdmUsIHRoZSB2YXJpYWJsZQovLyAnZG91YmxlIGQnIGlzIGluaXRp
YWxpemVkICphZnRlciogaXRzCi8vICBhZGRyZXNzIGlzIGxvYWRlZCBpbnRvICpwIChkaXNhc3Nl
bWJseSBzYXlzKS4KLy8gVGhlIHNhbWUgb2NjdXJzIHdpdGggJ2Zsb2F0JyB0eXBlLgovLwovLyAg
IHNrYWxAcGxhbmV0LWQubmV0CgojaW5jbHVkZSA8c3RkaW8uaD4KaW50IG1haW4oKSB7CiAgZG91
YmxlIGQgPSAxLjA7CiAgdW5zaWduZWQgc2hvcnQgKnAgPSAodW5zaWduZWQgc2hvcnQgKikmZDsK
ICBpbnQgQkUgPSAocFswXSAhPSAwKTsKICBpZiAoQkUpCiAgICBwcmludGYoICJlcnJvciEgQkU9
JWRcbiIsIEJFICk7CiAgZWxzZQogICAgcHJpbnRmKCJva1xuIik7CgogIHJldHVybiAwOwp9Cg==


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