public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/95520] New: [coroutines] __builtin_FUNCTION() returns mangled .actor instead of original function name
@ 2020-06-03 23:42 bruck.michael at gmail dot com
  2020-06-04 19:57 ` [Bug c++/95520] " iains at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: bruck.michael at gmail dot com @ 2020-06-03 23:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95520

            Bug ID: 95520
           Summary: [coroutines] __builtin_FUNCTION() returns mangled
                    .actor instead of original function name
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bruck.michael at gmail dot com
  Target Milestone: ---

#include <coroutine>
#include <cstdio>

struct pt
{
    using handle_t = std::coroutine_handle<pt>;
    auto get_return_object() noexcept { return handle_t::from_promise(*this); }

    std::suspend_never initial_suspend() const noexcept { return {}; }
    std::suspend_never final_suspend() const noexcept { return {}; }
    void return_void() const noexcept {}
    void unhandled_exception() const noexcept {}
};

template <> struct std::coroutine_traits<pt::handle_t>
    { using promise_type = pt; };

static pt::handle_t foo()
{ 
    printf("coroutine name %s\n", __builtin_FUNCTION());
    co_return;
}

int main()
{
    foo();
}
--
prints:
coroutine name _ZL3foov.actor

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-10-03 19:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-03 23:42 [Bug c++/95520] New: [coroutines] __builtin_FUNCTION() returns mangled .actor instead of original function name bruck.michael at gmail dot com
2020-06-04 19:57 ` [Bug c++/95520] " iains at gcc dot gnu.org
2020-07-23  6:51 ` rguenth at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2021-05-04 12:32 ` rguenth at gcc dot gnu.org
2021-07-19 20:18 ` cvs-commit at gcc dot gnu.org
2021-07-20  6:56 ` cvs-commit at gcc dot gnu.org
2021-10-03 19:28 ` cvs-commit at gcc dot gnu.org
2021-10-03 19:39 ` iains at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).