https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78717

--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
Did you forget to enable optimizations? At -O0, there is no point keeping those
extern templates around, so gcc saves time by dropping them. At -O1 and above,
I do see some extra functions in the gimple dump. I don't see as many as if I
change _GLIBCXX_EXTERN_TEMPLATE to 0 in bits/c++config.h, some heuristic likely
decided to keep only the functions small enough that they are good candidates
for inlining (I didn't try to tweak the inlining parameters to see if I could
get it to keep all relevant functions).
I agree that this is not nice, there are several PRs in bugzilla caused by
those extern templates not being inlined aggressively enough. My hope is that
LTO will make enough progress that we can have libstdc++ compiled with it and
inline functions from the library.

Reply via email to