]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++/modules: Revert "Remove unnecessary lazy_load_pendings"
authorNathaniel Shead <nathanieloshead@gmail.com>
Fri, 9 May 2025 15:12:20 +0000 (01:12 +1000)
committerNathaniel Shead <nathanieloshead@gmail.com>
Wed, 14 May 2025 09:26:24 +0000 (19:26 +1000)
commit011ea36d0e5828e9db848f4a46b9a17f634ed2c0
treefc0691327ebb5617077bda29d8ecd9a494788147
parent3ecca8f3ad7e7fe3da0e600fb66fca3dc6bae006
c++/modules: Revert "Remove unnecessary lazy_load_pendings"

This reverts commit r16-63-g241157eb0858b3.  It turns out that the
'lazy_load_pendings' is necessary if we haven't seen a binding for the
given template name at all in the current TU, as it is also used to find
template instantiations with the given name.

gcc/cp/ChangeLog:

* name-lookup.cc (lookup_imported_hidden_friend): Add back
lazy_load_pendings with comment.

gcc/testsuite/ChangeLog:

* g++.dg/modules/tpl-friend-19_a.C: New test.
* g++.dg/modules/tpl-friend-19_b.C: New test.

Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
gcc/cp/name-lookup.cc
gcc/testsuite/g++.dg/modules/tpl-friend-19_a.C [new file with mode: 0644]
gcc/testsuite/g++.dg/modules/tpl-friend-19_b.C [new file with mode: 0644]