]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: make source_location follow DECL_RAMP_FN
authorArsen Arsenović <arsen@aarsen.me>
Thu, 25 Jul 2024 14:13:24 +0000 (16:13 +0200)
committerArsen Arsenovic <arsen@gcc.gnu.org>
Tue, 30 Jul 2024 11:02:07 +0000 (13:02 +0200)
commit265aa32062167a5b299c2ffb616edce5997b64bf
tree83497c53a8ed05346f0eb4f5ae0f541a9c4f0a79
parent136f364e26d9ad4f05e0005e480813cdc8f56c96
c++: make source_location follow DECL_RAMP_FN

This fixes the value of current_function in compiler generated coroutine
code.

PR c++/110855 - std::source_location doesn't work with C++20 coroutine

gcc/cp/ChangeLog:

PR c++/110855
* cp-gimplify.cc (fold_builtin_source_location): Use the name of
the DECL_RAMP_FN of the current function if present.

gcc/testsuite/ChangeLog:

PR c++/110855
* g++.dg/coroutines/pr110855.C: New test.
gcc/cp/cp-gimplify.cc
gcc/testsuite/g++.dg/coroutines/pr110855.C [new file with mode: 0644]