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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jason at gcc dot gnu.org
         Resolution|                            |INVALID

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2012-09-19 
12:30:19 UTC ---
This happens because -O2 now includes -finline-small-functions, so the call to
deserialize from operator>> is inlined.  Since deserialize is an implicit
instantiation, the compiler only emits it in places where it is needed, and it
isn't needed in this translation unit because all uses have been inlined.

G++ expects that the definition of a template will be available in all
translation units that use it unless it is explicitly instantiated.

You can use -O2 -fno-inline-small-functions to restore the older behavior.

Reply via email to