http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60854

            Bug ID: 60854
           Summary: inline constructor of extern template
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: joachim.schoeberl at tuwien dot ac.at

Created attachment 32610
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32610&action=edit
source file

this code was accepted by gcc-4.8 up to (at least) gcc-4.9-20140323, but g++
(GCC) 4.9.0 20140411 (prerelease) complains.

compiled with
g++ -c -O2 --std=c++11 test.cpp



error message of gcc-4.9.0 prerelease:

test.cpp: In function ‘void Func()’:
test.cpp:5:46: error: inlining failed in call to always_inline
‘MyClass<T>::MyClass() [with T = double]’: function body not available
   __attribute__ ((__always_inline__)) inline MyClass () { ; }
                                              ^
test.cpp:12:19: error: called from here
   MyClass<double> x;
                   ^

Reply via email to