This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR c++/85400
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 30 Apr 2018 10:43:13 +0200
- Subject: Re: [PATCH] Fix PR c++/85400
- References: <32444455.vUGMIimiic@polaris> <CADzB+2=QG==jTM_b7VnH1CuPJeUzJTSrogOJSQZdNVaGWfnr6g@mail.gmail.com>
> It seems like we're likely to need the same thing when we get to
> make_decl_one_only by other paths; perhaps we should put this
> recalculation in a cxx_make_decl_one_only.
There are 4 calls to make_decl_one_only in the cp/ directory: the one at stake
here in comdat_linkage, 1 in maybe_make_one_only, 1 in get_guard and 1 in
get_tls_init_fn. The last 2 don't need the recalculation, especially the 3rd
one which makes a copy of the TLS model.
There are 3 calls to maybe_make_one_only in the cp/directory: 1 from
start_preparsed_function, 1 from mark_decl_instantiated and 1 one from
import_export_decl but guarded by DECL_FUNCTION_MEMBER_P. The 1st and 3rd
don't need the recalculation.
So it isn't clear to me if a cxx_make_decl_one_only is the way to go. Maybe
doing the recalculation in comdat_linkage and maybe_make_one_only only would
be sufficient.
--
Eric Botcazou