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]

c++/1532: -O3 generates (obviously) redundant tests and jumps



>Number:         1532
>Category:       c++
>Synopsis:       -O3 generates (obviously) redundant tests and jumps
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          pessimizes-code
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 01 09:06:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     duchier@ps.uni-sb.de
>Release:        all recent versions, including the development version
>Organization:
>Environment:
GNU/Linux, Intel
>Description:
tests and jumps involving (small) integer constants
are not optimized away (even performed redundantly).
>How-To-Repeat:
compile the attached file with all optimizations turned
on (in particular -O3) and inspect the assembly code
generated.
>Fix:

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

aW5saW5lIGludCBjaGVjayhpbnQgaSxpbnQgaikgewogIGlmIChpPT1qKSByZXR1cm4gMDsKICBl
bHNlIGlmIChpPmopIHJldHVybiAxOwogIGVsc2UgcmV0dXJuIDI7Cn0KCmludCBmb28oaW50IGks
aW50IGopIHsKICBzd2l0Y2ggKGNoZWNrKGksaikpIHsKICBjYXNlIDA6IHJldHVybiBpK2o7CiAg
Y2FzZSAxOiByZXR1cm4gaTsKICBjYXNlIDI6IHJldHVybiBqOwogIH0KfQo=

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