public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: barto@visionpro.com To: gcc-gnats@gcc.gnu.org Subject: c++/3064: optimizer fails to genrate correct code. Date: Wed, 06 Jun 2001 11:16:00 -0000 [thread overview] Message-ID: <20010606180709.11253.qmail@sourceware.cygnus.com> (raw) >Number: 3064 >Category: c++ >Synopsis: optimizer fails to genrate correct code. >Confidential: no >Severity: serious >Priority: high >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed Jun 06 11:16:06 PDT 2001 >Closed-Date: >Last-Modified: >Originator: barto@visionpro.com >Release: gcc-2.95.3 >Organization: >Environment: Solaris 8, gas 2.95.3 >Description: g++ -O3 -finline-functions -funroll-loops -S xxx.c generates 3 calls to the log function, each doing nothing. >How-To-Repeat: g++ -O3 -finline-functions -funroll-loops -S xxx.c examine the resulting assembly output >Fix: fix your code to call the log function only one time. >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="xxx.c" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="xxx.c" I2luY2x1ZGUgPG1hdGguaD4KdHlwZWRlZiB1bnNpZ25lZCBjaGFyIG1hdGJpZ19kYXRhX3QgOwoK Y2xhc3MgTSB7CnB1YmxpYzoKICAgIG1hdGJpZ19kYXRhX3QgKnZjdHIoKTsKICAgIGlubGluZSBp bnQgaGVpZ2h0KCkgY29uc3QgeyByZXR1cm4oX3dpZHRoKTsgfQogICAgaW5saW5lIGludCB3aWR0 aCgpIGNvbnN0IHsgcmV0dXJuKF9oZWlnaHQpOyB9CnByaXZhdGU6CiAgICBpbnQgX3dpZHRoLCBf aGVpZ2h0Owp9OwoKZXh0ZXJuIGludCBhcHByb3hfYXZlcmFnZTsKCnZvaWQKZXh0cmFjdF9mZWF0 dXJlcyhNJiBfbXQpCnsKICAgIGZsb2F0IHRvdGFsX3N1bTsKICAgIGZsb2F0IHN1bV9sb2c7Cgog ICAgaW50IGs7CiAgICBpbnQgaTsKICAgIG1hdGJpZ19kYXRhX3QgKnAsICpwcDsKICAgIGZvciAo ayA9IDAsIHBwID0gX210LnZjdHIoKTsgKytrIDw9IF9tdC5oZWlnaHQoKTsgcHAgKz0gX210Lndp ZHRoKCkpIHsKCWZvciAocCA9IHBwLCBpID0gMDsgKytpIDw9IF9tdC53aWR0aCgpOyBwKyspIHsK CSAgICBtYXRiaWdfZGF0YV90IHBfZGF0YSA9ICpwOwoKCSAgICBpZiAocF9kYXRhKSB7CgkJZmxv YXQgYXBwcm94ID0gaSAtIGFwcHJveF9hdmVyYWdlOwoJCWZsb2F0IGxuID0gbG9nKGFwcHJveCk7 CgoJCXRvdGFsX3N1bSArPSBhcHByb3ggKiBsb2coYXBwcm94KTsKCQlzdW1fbG9nICs9IGxvZyhh cHByb3gpOwoJCS8vIHRvdGFsX3N1bSArPSBhcHByb3ggKiBsbjsKCQkvLyBzdW1fbG9nICs9IGxu OwoJICAgIH0KCX0KICAgIH0KfQoK
reply other threads:[~2001-06-06 11:16 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20010606180709.11253.qmail@sourceware.cygnus.com \ --to=barto@visionpro.com \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).