public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: drepper@redhat.com To: gcc-gnats@gcc.gnu.org Subject: optimization/7515: invalid inlining Date: Tue, 06 Aug 2002 20:26:00 -0000 [thread overview] Message-ID: <20020807032554.8223.qmail@sources.redhat.com> (raw) >Number: 7515 >Category: optimization >Synopsis: invalid inlining >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Tue Aug 06 20:26:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Ulrich Drepper >Release: at least 2.96 and later >Organization: >Environment: x86 Linux, but probably all others >Description: When -O3 is used gcc performs invalid inlining optimizations. Functions, which are not declared static or have a visibility != default must not be inlined. At least when generating code for ELF binaries. The semantic changes since 'foo' will not be looked up using the ELF symbol resolution rules which would allow interposition. >How-To-Repeat: Compile the attached code with -O3. The result is that 'foo' gets inlined. >Fix: Only inline if the function is static, has visibility != default, or possibly if a new function attribute or command line option is used. >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="o3.c" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="o3.c" aW50CmZvbyAoaW50IGEpCnsKICAgIHJldHVybiBhOwp9CgppbnQKYmFyIChpbnQgYSkKewogICAg cmV0dXJuIGZvbyAoYSkgPT0gMTsKfQo=
next reply other threads:[~2002-08-07 3:26 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-08-06 20:26 drepper [this message] 2002-08-06 21:10 geoffk 2002-08-06 21:16 Geoff Keating 2002-08-06 21:26 Ulrich Drepper 2002-08-30 19:46 rth
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=20020807032554.8223.qmail@sources.redhat.com \ --to=drepper@redhat.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).