[Bug ipa/66751] New: Inline optimizes away function, keeping call to it in code
konstantin.vladimirov at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Jul 3 11:34:00 GMT 2015
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.
More information about the Gcc-bugs
mailing list