public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/66751] New: Inline optimizes away function, keeping call to it in code
@ 2015-07-03 11:34 konstantin.vladimirov at gmail dot com
  2015-07-03 11:42 ` [Bug ipa/66751] " rguenth at gcc dot gnu.org
  2015-07-03 11:43 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: konstantin.vladimirov at gmail dot com @ 2015-07-03 11:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66751

            Bug ID: 66751
           Summary: Inline optimizes away function, keeping call to it in
                    code
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: konstantin.vladimirov at gmail dot com
  Target Milestone: ---

Created attachment 35903
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35903&action=edit
reproduction

Using gcc 5.1.0

$ ~/x86-toolchain-5.1/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/home/tilir/x86-toolchain-5.1/bin/gcc
COLLECT_LTO_WRAPPER=/home/tilir/x86-toolchain-5.1/libexec/gcc/x86_64-unknown-linux-gnu/5.1.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-5.1-src/gcc_5_1_0_release/configure
--enable-languages=c,c++ --prefix=/home/tilir/x86-toolchain-5.1/
Thread model: posix
gcc version 5.1.0 (GCC) 

Trying to compile given file (see attachment)

$ ~/x86-toolchain-5.1/bin/gcc -O1 980608-1.c -fdump-tree-all

yields:

/tmp/cczJo9UK.o: In function `main':
980608-1.c:(.text+0x4b): undefined reference to `debug'

Between 980608-1.c.046t.inline_param2 and 980608-1.c.068t.fixup_cfg4 given
function disappears from gimple source (I suspect inliner) but reference to it
is still inside main.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug ipa/66751] Inline optimizes away function, keeping call to it in code
  2015-07-03 11:34 [Bug ipa/66751] New: Inline optimizes away function, keeping call to it in code konstantin.vladimirov at gmail dot com
@ 2015-07-03 11:42 ` rguenth at gcc dot gnu.org
  2015-07-03 11:43 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-03 11:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66751

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
No, this is just C99 at work - the inline declaration of debug doesn't cause
an out-of-line copy to be generated.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug ipa/66751] Inline optimizes away function, keeping call to it in code
  2015-07-03 11:34 [Bug ipa/66751] New: Inline optimizes away function, keeping call to it in code konstantin.vladimirov at gmail dot com
  2015-07-03 11:42 ` [Bug ipa/66751] " rguenth at gcc dot gnu.org
@ 2015-07-03 11:43 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-07-03 11:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66751

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
GNU 90 vs C99/C11 inline semantics. 

The default standard changed.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-03 11:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-03 11:34 [Bug ipa/66751] New: Inline optimizes away function, keeping call to it in code konstantin.vladimirov at gmail dot com
2015-07-03 11:42 ` [Bug ipa/66751] " rguenth at gcc dot gnu.org
2015-07-03 11:43 ` pinskia at gcc dot gnu.org

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).