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

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-10-02
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #4 from Iain Sandoe <iains at gcc dot gnu.org> ---
For the record, general VLAs are not supported by clang coroutines either.
the following coroutine fails to compile there as well.

//using test-suite convenience headers.
#include "coro.h"
#include "coro1-ret-int-yield-int.h"

struct coro1
foo (int arg) noexcept
{
  PRINTF ("foo arg = %d\n", arg);
  char arr[arg];
  if (arg < 4)
    co_return -6174;
  else
    for (int i = 0; i < arg; ++i) arr[i] = (char) i;
  co_yield (int) arr[2];
  co_return (int) arr[3];
}

Reply via email to