]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++/modules: explicit inst of constructor
authorJason Merrill <jason@redhat.com>
Sat, 15 Nov 2025 17:43:37 +0000 (23:13 +0530)
committerJason Merrill <jason@redhat.com>
Sat, 15 Nov 2025 17:43:37 +0000 (23:13 +0530)
commitc38bf35f0c7fa1dadaae4c2811b24aa4cd764cab
treee6d00623c781b2a5304daed875b6f7053040cdd0
parent1569b0ad0e5a6b4d94d28fd9feffc6ae6ff3afdf
c++/modules: explicit inst of constructor

The extern template __shared_ptr<filesystem::_Dir> in bits/fs_dir.h was
leading to an ICE in import_export_decl in 29_atomics/atomic_ref/address.cc
because we had the nonsensical combination of DECL_REALLY_EXTERN and
!DECL_INTERFACE_KNOWN.  This turned out to be because mark_decl_instantiated
was exiting early if TREE_ASM_WRITTEN since way back in the pre-cgraph days,
and expand_or_defer_fn_1 sets TREE_ASM_WRITTEN on maybe-in-charge ctors.
The mark_decl_instantiated code is long-obsolete, so let's just remove it.

gcc/cp/ChangeLog:

* module.cc (trees_out::write_function_def): Check flag consistency.
* pt.cc (mark_decl_instantiated): Ignore TREE_ASM_WRITTEN.
gcc/cp/module.cc
gcc/cp/pt.cc