public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "joker.eph at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/60235] New: Inlining fails with template specialization and -fPIC on Linux AMD64 Date: Mon, 17 Feb 2014 06:27:00 -0000 [thread overview] Message-ID: <bug-60235-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60235 Bug ID: 60235 Summary: Inlining fails with template specialization and -fPIC on Linux AMD64 Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: joker.eph at gmail dot com Tested with g++-4.6, g++4.8 and current svn: $ ./gcc-svn-install/bin/g++ --version g++ (GCC) 4.9.0 20140217 (experimental) I have a simple C++ code that exhibit this issue: a simple templated function using one int as template parameter. When a specialization is provided the call is not inlined, but only when compiling with -fPIC (Ubuntu Linux AMD64). The issue does not appear with g++-4.8 on OSX. Clang does not have this issue, in the benchmark I extracted this minimal test case from, this missing inline doubles the running time. To reproduce : $ g++ inlining.cpp -O2 -S -fPIC -DNOSPECIALIZATION $ grep get inlining.s | grep call $ g++ inlining.cpp -O2 -S -fPIC $ grep get inlining.s | grep call call _Z3getILi0EERdPd@PLT
next reply other threads:[~2014-02-17 6:27 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-02-17 6:27 joker.eph at gmail dot com [this message] 2014-02-17 6:27 ` [Bug middle-end/60235] " joker.eph at gmail dot com 2014-02-17 8:15 ` jakub at gcc dot gnu.org 2014-02-17 12:37 ` rguenth at gcc dot gnu.org 2014-02-17 17:05 ` hubicka at gcc dot gnu.org 2014-02-17 17:28 ` joker.eph at gmail dot com 2014-02-17 18:59 ` jakub at gcc dot gnu.org 2014-02-17 19:03 ` joker.eph at gmail dot com 2022-01-10 10:07 ` [Bug ipa/60235] " pinskia at gcc dot gnu.org 2022-01-10 10:08 ` pinskia at gcc dot gnu.org
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=bug-60235-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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).