aboutsummaryrefslogtreecommitdiff
path: root/libgcc/libgcov-interface.c
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2023-02-03 09:41:10 -0500
committerPatrick Palka <ppalka@redhat.com>2023-02-03 09:41:10 -0500
commit59e0376f607805ef9b67fd7b0a4a3084ab3571a5 (patch)
tree14f66e3a67c240451c7814e5f314e7b05107ee54 /libgcc/libgcov-interface.c
parented2b519e02eac99fadfa51adc7b11f8854c24575 (diff)
downloadgcc-59e0376f607805ef9b67fd7b0a4a3084ab3571a5.zip
gcc-59e0376f607805ef9b67fd7b0a4a3084ab3571a5.tar.gz
gcc-59e0376f607805ef9b67fd7b0a4a3084ab3571a5.tar.bz2
c++: unexpected ADDR_EXPR after overload set pruning [PR107461]
Here the ahead-of-time overload set pruning in finish_call_expr is unintentionally returning a CALL_EXPR whose (pruned) callee is wrapped in an ADDR_EXPR, despite the original callee not being wrapped in an ADDR_EXPR. This ends up causing a bogus declaration mismatch error in the below testcase because the call to min in #1 gets expressed as a CALL_EXPR of ADDR_EXPR of FUNCTION_DECL, whereas the level-lowered call to min in #2 gets expressed instead as a CALL_EXPR of FUNCTION_DECL. This patch fixes this by stripping the spurious ADDR_EXPR appropriately. Thus the first call to min now also gets expressed as a CALL_EXPR of FUNCTION_DECL, matching the behavior before r12-6075-g2decd2cabe5a4f. PR c++/107461 gcc/cp/ChangeLog: * semantics.cc (finish_call_expr): Strip ADDR_EXPR from the selected callee during overload set pruning. gcc/testsuite/ChangeLog: * g++.dg/template/call9.C: New test.
Diffstat (limited to 'libgcc/libgcov-interface.c')
0 files changed, 0 insertions, 0 deletions