public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106997] New: Use coroutines on avr-gcc
@ 2022-09-21 13:40 klaus.doldinger64 at googlemail dot com
  2022-09-21 13:50 ` [Bug c++/106997] " redi at gcc dot gnu.org
  2022-09-22 12:21 ` klaus.doldinger64 at googlemail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: klaus.doldinger64 at googlemail dot com @ 2022-09-21 13:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106997
           Summary: Use coroutines on avr-gcc
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: klaus.doldinger64 at googlemail dot com
  Target Milestone: ---

I tried to use coroutines with avr-gcc (13.0.0) for the AVR target. I managed
to include the coroutine-header and to write a very simple generator using the
example from cppreference.

It compiles well, but then I get undefined symbols:

1) new and delete operator-functions
2) f(f()::f().Frame*)

Therefore two question arise here:

a) is it possible to use coroutines without head-allocation? E.g. define some
global storage for the state of the coroutine?
b) if a) can be fullfilled, what is 2) supposed to do?

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

* [Bug c++/106997] Use coroutines on avr-gcc
  2022-09-21 13:40 [Bug c++/106997] New: Use coroutines on avr-gcc klaus.doldinger64 at googlemail dot com
@ 2022-09-21 13:50 ` redi at gcc dot gnu.org
  2022-09-22 12:21 ` klaus.doldinger64 at googlemail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2022-09-21 13:50 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This is not a bug report, and you already asked it on gcc-help where such
questions belong.

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

* [Bug c++/106997] Use coroutines on avr-gcc
  2022-09-21 13:40 [Bug c++/106997] New: Use coroutines on avr-gcc klaus.doldinger64 at googlemail dot com
  2022-09-21 13:50 ` [Bug c++/106997] " redi at gcc dot gnu.org
@ 2022-09-22 12:21 ` klaus.doldinger64 at googlemail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: klaus.doldinger64 at googlemail dot com @ 2022-09-22 12:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Wilhelm M <klaus.doldinger64 at googlemail dot com> ---
I would consider this a missed optimization rather than a bug, because the
standard says, that an implementation can avoid heap allocation if:

- the lifetime of the coroutine is strictly within the lifetime of the caller
- the size of coroutine state can be determined at compile time

The case I tested falls within the above statement.

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

end of thread, other threads:[~2022-09-22 12:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-21 13:40 [Bug c++/106997] New: Use coroutines on avr-gcc klaus.doldinger64 at googlemail dot com
2022-09-21 13:50 ` [Bug c++/106997] " redi at gcc dot gnu.org
2022-09-22 12:21 ` klaus.doldinger64 at googlemail dot com

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).