summaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorDaniele Sahebi <daniele@mkryss.me>2025-11-19 17:03:05 +0100
committerPatrick Palka <ppalka@redhat.com>2025-11-21 20:59:17 -0500
commit9badb670e28dae8c5a98ac3217eb16dfac20d38c (patch)
treec06821f5090c6d5d46f9681813b446e60d6cb554 /libcpp
parent10e987956f243550b174922722fff7798ebd54c2 (diff)
c++: fix ICE with consteval functions in template decls [PR122658]
Currently, build_over_call calls build_cplus_new in template decls, generating a TARGET_EXPR that it then passes to fold_non_dependent_expr, which ends up calling tsubst_expr, and since tsubst_expr doesn't handle TARGET_EXPRs, it ICEs. Since there is no way for this code path to be executed without causing an ICE, I believe it can be removed. PR c++/122658 gcc/cp/ChangeLog: * call.cc (build_over_call): Don't call build_cplus_new in template declarations. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/consteval42.C: New test. Co-authored-by: Jakub Jelinek <jakub@redhat.com> Signed-off-by: Daniele Sahebi <daniele@mkryss.me> Reviewed-by: Marek Polacek <polacek@redhat.com> Reviewed-by: Patrick Palka <ppalka@redhat.com>
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions