diff options
author | Jason Merrill <jason@redhat.com> | 2022-02-17 00:04:21 -0500 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2022-02-17 17:50:59 -0500 |
commit | 2c9b7077b72529fbbe896212a0088bff6025c5e7 (patch) | |
tree | c84aba9d3039be7e36d91f78bac3246369748514 /gcc/d/expr.cc | |
parent | 1b71bc7c8b18bd1b22debfde155f175fd1654942 (diff) | |
download | gcc-2c9b7077b72529fbbe896212a0088bff6025c5e7.zip gcc-2c9b7077b72529fbbe896212a0088bff6025c5e7.tar.gz gcc-2c9b7077b72529fbbe896212a0088bff6025c5e7.tar.bz2 |
c++: inlining explicit instantiations [PR104539]
The PR10968 fix cleared DECL_COMDAT to force output of explicit
instantiations. Then the PR59469 fix added a call to mark_needed, after
which we no longer need to clear DECL_COMDAT, and leaving it set allows us
to inline explicit instantiations without worrying about symbol
interposition.
I suppose there's an argument to be made that an explicit instantiation
declaration (extern template) should clear DECL_COMDAT, since that suggests
that there will be only a single instantiation somewhere that could be
subject to interposition, but that doesn't change the 'inline' semantics,
and it seems cleaner to treat template instantiations uniformly.
PR c++/104539
gcc/cp/ChangeLog:
* pt.cc (mark_decl_instantiated): Don't clear DECL_COMDAT.
gcc/testsuite/ChangeLog:
* g++.dg/ipa/inline-4.C: New test.
Diffstat (limited to 'gcc/d/expr.cc')
0 files changed, 0 insertions, 0 deletions