public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/60235] New: Inlining fails with template specialization and -fPIC on Linux AMD64
@ 2014-02-17  6:27 joker.eph at gmail dot com
  2014-02-17  6:27 ` [Bug middle-end/60235] " joker.eph at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: joker.eph at gmail dot com @ 2014-02-17  6:27 UTC (permalink / raw)
  To: gcc-bugs

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


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

end of thread, other threads:[~2022-01-10 10:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-17  6:27 [Bug middle-end/60235] New: Inlining fails with template specialization and -fPIC on Linux AMD64 joker.eph at gmail dot com
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

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