diff options
author | Nathaniel Shead <nathanieloshead@gmail.com> | 2025-04-25 22:45:41 +1000 |
---|---|---|
committer | Nathaniel Shead <nathanieloshead@gmail.com> | 2025-05-01 09:51:31 +1000 |
commit | d613678c94f06809656e56b37f314501b37a5ddd (patch) | |
tree | 881f6dc710188b83f5e142a0dba88f6f96da9e42 /libjava/java/util/Hashtable$HashEntry.h | |
parent | 22ccaded63e96e5a42f4e3676dbbb57aa05b36f9 (diff) | |
download | gcc-d613678c94f06809656e56b37f314501b37a5ddd.zip gcc-d613678c94f06809656e56b37f314501b37a5ddd.tar.gz gcc-d613678c94f06809656e56b37f314501b37a5ddd.tar.bz2 |
c++/modules: Fix imported CNTTPs being considered non-constant [PR119938]
When importing a CNTTP object, since r15-3031-g0b7904e274fbd6 we
shortcut the processing of the generated NTTP so that we don't attempt
to recursively load pendings. However, due to an oversight we do not
properly set TREE_CONSTANT or DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P
on the decl, which confuses later processing. This patch ensures that
this happens correctly.
PR c++/119938
gcc/cp/ChangeLog:
* pt.cc (get_template_parm_object): When !check_init, add assert
that expr really is constant and mark decl as such.
gcc/testsuite/ChangeLog:
* g++.dg/modules/tpl-nttp-2_a.H: New test.
* g++.dg/modules/tpl-nttp-2_b.C: New test.
Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Reviewed-by: Jason Merrill <jason@redhat.com>
Diffstat (limited to 'libjava/java/util/Hashtable$HashEntry.h')
0 files changed, 0 insertions, 0 deletions