From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7555 invoked by alias); 3 Jul 2015 11:34:39 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 5784 invoked by uid 48); 3 Jul 2015 11:34:35 -0000 From: "konstantin.vladimirov at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/66751] New: Inline optimizes away function, keeping call to it in code Date: Fri, 03 Jul 2015 11:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 5.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: konstantin.vladimirov at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-07/txt/msg00249.txt.bz2 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.