[Bug c++/102528] Unused out-of-line functions emitted for trivial coroutines

2021-10-04 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102528 --- Comment #5 from Iain Sandoe --- hmm let me see if I can reproduce this (I didn't see it in my earlier tests): .L41: ud2 test(): ret which would make things look somewhat strange indeed (the functions are all TU-local - so

[Bug c++/102528] Unused out-of-line functions emitted for trivial coroutines

2021-10-04 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102528 --- Comment #4 from Iain Sandoe --- note I looked at master (trunk) and 11.2.

[Bug c++/102528] Unused out-of-line functions emitted for trivial coroutines

2021-10-04 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102528 --- Comment #3 from Iain Sandoe --- (In reply to Mathias Stearn from comment #0) > https://godbolt.org/z/aoab9W4xG > > This should all compile away, and test() should just be a single ret > instruction. That is not what happens now, even w

[Bug c++/102528] Unused out-of-line functions emitted for trivial coroutines

2021-10-04 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102528 Iain Sandoe changed: What|Removed |Added Last reconfirmed||2021-10-04 Ever confirmed|0

[Bug c++/102528] Unused out-of-line functions emitted for trivial coroutines

2021-09-29 Thread redbeard0531 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102528 --- Comment #1 from Mathias Stearn --- Sorry, there was a typo in the initial code. I forgot the trivial implementation of await_resume(). (D'oh!) Now I can see that test() is just a ret instruction, but there is still a lot of dead code emitte