[Bug c++/58045] gcc 4.8 produces an undefined reference to an inline function
hubicka at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Sep 9 08:55:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58045
Jan Hubicka <hubicka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-09-09
Ever confirmed|0 |1
--- Comment #1 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
This is different from the other PR.
Here C++ FE declare the function as:
_ZNK4llvm14raw_fd_ostream11current_posEv/6 (virtual uint64_t
llvm::raw_fd_ostream::current_pos() const) @0x7ffff7047980
Type: function definition analyzed
Visibility: external public weak comdat
comdat_group:_ZNK4llvm14raw_fd_ostream11current_posEv one_only virtual
References: __gcov0._ZNK4llvm14raw_fd_ostream11current_posEv/78
(read)__gcov0._ZNK4llvm14raw_fd_ostream11current_posEv/78 (write)
Referring:
Availability: available
Profile id: 1497168468
Function flags: body
Called by:
_ZL16writeStringTableRN4llvm14raw_fd_ostreamENS_8ArrayRefIN12_GLOBAL__N_118NewArchiveIteratorEEERSt6vectorIjSaIjEE.isra.8.constprop.12/90
(1.47 per call) (can throw external)
The meaning of external comdat does not make that much sense to me but I can
definitely make can_refer_decl_in_current_unit_p to declare the function
non-referable. That would untimately prevent inlining while it is certainly
possible, since body is around.
Jason, why the function is external and isn't there way to simply make it
comdat?
More information about the Gcc-bugs
mailing list