public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error
@ 2021-12-31  0:44 egor.pugin at gmail dot com
  2021-12-31  0:46 ` [Bug c++/103871] " egor.pugin at gmail dot com
                   ` (23 more replies)
  0 siblings, 24 replies; 25+ messages in thread
From: egor.pugin at gmail dot com @ 2021-12-31  0:44 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103871
           Summary: [11.2.1/12 Regression] co_await causes build error
           Product: gcc
           Version: 11.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: egor.pugin at gmail dot com
  Target Milestone: ---

See https://godbolt.org/z/8zTGKj8Ts

gcc (trunk) fails.
gcc 11.2.0 builds ok.

error:

<source>: In function 'async_task f()':
<source>:28:1: error: array used as initializer
   28 | }
      | ^
ASM generation compiler returned: 1
<source>: In function 'async_task f()':
<source>:28:1: error: array used as initializer
   28 | }
      | ^

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

* [Bug c++/103871] [11.2.1/12 Regression] co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
@ 2021-12-31  0:46 ` egor.pugin at gmail dot com
  2021-12-31  9:36 ` [Bug c++/103871] [11/12 " egor.pugin at gmail dot com
                   ` (22 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: egor.pugin at gmail dot com @ 2021-12-31  0:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Egor Pugin <egor.pugin at gmail dot com> ---
11.2.1 fails

g++ --version
g++ (GCC) 11.2.1 20211203 (Red Hat 11.2.1-7)

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

* [Bug c++/103871] [11/12 Regression] co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
  2021-12-31  0:46 ` [Bug c++/103871] " egor.pugin at gmail dot com
@ 2021-12-31  9:36 ` egor.pugin at gmail dot com
  2021-12-31 10:39 ` jakub at gcc dot gnu.org
                   ` (21 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: egor.pugin at gmail dot com @ 2021-12-31  9:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Egor Pugin <egor.pugin at gmail dot com> ---
Repro

#include <coroutine>
#include <memory>
#include <vector>

struct s {
    s(std::vector<long> &&);
};
struct async_task {
    struct promise_type {
        auto initial_suspend() const { return std::suspend_never{}; }
        auto final_suspend() noexcept { return std::suspend_never{}; }
        auto get_return_object() { return async_task{}; }
        void return_void() {}
        void unhandled_exception() {}
    };
    bool await_ready() const { return false; }
    void await_suspend(std::coroutine_handle<> h) {}
    auto await_resume() {}
};
auto g(auto f) {
    return async_task{};
}
async_task f() {
    // comment out co_await to make error disappear
    co_await g(std::make_unique<s>(std::vector{0L})); // error
    //g(std::make_unique<s>(std::vector{0L})); // ok
    co_return;
}
int main() {
    f();
}

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

* [Bug c++/103871] [11/12 Regression] co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
  2021-12-31  0:46 ` [Bug c++/103871] " egor.pugin at gmail dot com
  2021-12-31  9:36 ` [Bug c++/103871] [11/12 " egor.pugin at gmail dot com
@ 2021-12-31 10:39 ` jakub at gcc dot gnu.org
  2021-12-31 11:47 ` iains at gcc dot gnu.org
                   ` (20 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-12-31 10:39 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.3
           Priority|P3                          |P1
             Status|UNCONFIRMED                 |NEW
                 CC|                            |iains at gcc dot gnu.org,
                   |                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-12-31

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
On the trunk started with r12-618-g14ed21f8749ae359690d9c4a69ca38cc45d0d1b0
which has been backported in r11-9055-gb874ece3ff95d3afa575d40b6e14e95cae8baf87

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

* [Bug c++/103871] [11/12 Regression] co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
                   ` (2 preceding siblings ...)
  2021-12-31 10:39 ` jakub at gcc dot gnu.org
@ 2021-12-31 11:47 ` iains at gcc dot gnu.org
  2022-03-02 20:59 ` mpolacek at gcc dot gnu.org
                   ` (19 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: iains at gcc dot gnu.org @ 2021-12-31 11:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Iain Sandoe <iains at gcc dot gnu.org> ---
this is most likely a dup of 98056 - I have some WIP to deal with that (but it
needs some more tidying before posting).

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

* [Bug c++/103871] [11/12 Regression] co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
                   ` (3 preceding siblings ...)
  2021-12-31 11:47 ` iains at gcc dot gnu.org
@ 2022-03-02 20:59 ` mpolacek at gcc dot gnu.org
  2022-03-02 22:41 ` iains at gcc dot gnu.org
                   ` (18 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2022-03-02 20:59 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Iain, do you want to assign this PR to yourself, then?

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

* [Bug c++/103871] [11/12 Regression] co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
                   ` (4 preceding siblings ...)
  2022-03-02 20:59 ` mpolacek at gcc dot gnu.org
@ 2022-03-02 22:41 ` iains at gcc dot gnu.org
  2022-03-03  0:36 ` mpolacek at gcc dot gnu.org
                   ` (17 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: iains at gcc dot gnu.org @ 2022-03-02 22:41 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |iains at gcc dot gnu.org

--- Comment #6 from Iain Sandoe <iains at gcc dot gnu.org> ---
yeah, OK

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

* [Bug c++/103871] [11/12 Regression] co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
                   ` (5 preceding siblings ...)
  2022-03-02 22:41 ` iains at gcc dot gnu.org
@ 2022-03-03  0:36 ` mpolacek at gcc dot gnu.org
  2022-03-20 12:36 ` sks_f at mail dot ru
                   ` (16 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2022-03-03  0:36 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

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

* [Bug c++/103871] [11/12 Regression] co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
                   ` (6 preceding siblings ...)
  2022-03-03  0:36 ` mpolacek at gcc dot gnu.org
@ 2022-03-20 12:36 ` sks_f at mail dot ru
  2022-04-06 21:55 ` jason at gcc dot gnu.org
                   ` (15 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: sks_f at mail dot ru @ 2022-03-20 12:36 UTC (permalink / raw)
  To: gcc-bugs

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

Konstantin <sks_f at mail dot ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sks_f at mail dot ru

--- Comment #7 from Konstantin <sks_f at mail dot ru> ---
Confirm, bug exist in 11.2.1. Would be nice if will be fixed in 11.3.

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

* [Bug c++/103871] [11/12 Regression] co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
                   ` (7 preceding siblings ...)
  2022-03-20 12:36 ` sks_f at mail dot ru
@ 2022-04-06 21:55 ` jason at gcc dot gnu.org
  2022-04-06 22:03 ` iains at gcc dot gnu.org
                   ` (14 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jason at gcc dot gnu.org @ 2022-04-06 21:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> ---
Any update?

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

* [Bug c++/103871] [11/12 Regression] co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
                   ` (8 preceding siblings ...)
  2022-04-06 21:55 ` jason at gcc dot gnu.org
@ 2022-04-06 22:03 ` iains at gcc dot gnu.org
  2022-04-12 19:16 ` iains at gcc dot gnu.org
                   ` (13 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: iains at gcc dot gnu.org @ 2022-04-06 22:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Jason Merrill from comment #8)
> Any update?

I have a fix (for a number of the coroutine issues, including this one) - it
needs tidying for posting .. will try to do that over the weekend.

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

* [Bug c++/103871] [11/12 Regression] co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
                   ` (9 preceding siblings ...)
  2022-04-06 22:03 ` iains at gcc dot gnu.org
@ 2022-04-12 19:16 ` iains at gcc dot gnu.org
  2022-04-13  6:25 ` rguenth at gcc dot gnu.org
                   ` (12 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: iains at gcc dot gnu.org @ 2022-04-12 19:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Iain Sandoe <iains at gcc dot gnu.org> ---
Despite investing some time in this, it seems that I cannot get a patch ready
for master / reviewed and back-ported in time (although I am hopeful to get the
fix sorted out in time for GCC-12)

(I can confirm that my fix does still work for this - but there is just not
enough time to process it through).

----

Looking at the test case and the diagnostics, it seems that PR98056 was latent
here and  the fix in r12-618-g14ed21f8749ae359690d9c4a69ca38cc45d0d1b0 has
simply revealed it.

a workaround in the example might be:

    auto task = g(std::make_unique<s>(std::vector{0L})); // ok
    co_await task;

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

* [Bug c++/103871] [11/12 Regression] co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
                   ` (10 preceding siblings ...)
  2022-04-12 19:16 ` iains at gcc dot gnu.org
@ 2022-04-13  6:25 ` rguenth at gcc dot gnu.org
  2022-04-13 14:25 ` jason at gcc dot gnu.org
                   ` (11 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-04-13  6:25 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|11.3                        |11.4
           Priority|P1                          |P2

--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
OK, thanks for trying - pushing to 11.4 and thus P2 then.

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

* [Bug c++/103871] [11/12 Regression] co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
                   ` (11 preceding siblings ...)
  2022-04-13  6:25 ` rguenth at gcc dot gnu.org
@ 2022-04-13 14:25 ` jason at gcc dot gnu.org
  2022-04-13 14:45 ` iains at gcc dot gnu.org
                   ` (10 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jason at gcc dot gnu.org @ 2022-04-13 14:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Jason Merrill <jason at gcc dot gnu.org> ---
Should we revert the backport for 11.3?

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

* [Bug c++/103871] [11/12 Regression] co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
                   ` (12 preceding siblings ...)
  2022-04-13 14:25 ` jason at gcc dot gnu.org
@ 2022-04-13 14:45 ` iains at gcc dot gnu.org
  2022-04-13 14:46 ` iains at gcc dot gnu.org
                   ` (9 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: iains at gcc dot gnu.org @ 2022-04-13 14:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Jason Merrill from comment #12)
> Should we revert the backport for 11.3?

I think that will regress other tests (but admit I did not have time to try
it).

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

* [Bug c++/103871] [11/12 Regression] co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
                   ` (13 preceding siblings ...)
  2022-04-13 14:45 ` iains at gcc dot gnu.org
@ 2022-04-13 14:46 ` iains at gcc dot gnu.org
  2022-05-23 10:26 ` [Bug c++/103871] [11/12/13 " blubban at gmail dot com
                   ` (8 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: iains at gcc dot gnu.org @ 2022-04-13 14:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Iain Sandoe from comment #13)
> (In reply to Jason Merrill from comment #12)
> > Should we revert the backport for 11.3?
> 
> I think that will regress other tests (but admit I did not have time to try
> it).

(and it does not actually fix the underlying problem - which is why I hadn't
pushed on that)

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

* [Bug c++/103871] [11/12/13 Regression] co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
                   ` (14 preceding siblings ...)
  2022-04-13 14:46 ` iains at gcc dot gnu.org
@ 2022-05-23 10:26 ` blubban at gmail dot com
  2023-01-04 14:43 ` kiwixz at outlook dot com
                   ` (7 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: blubban at gmail dot com @ 2022-05-23 10:26 UTC (permalink / raw)
  To: gcc-bugs

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

Alfred Agrell <blubban at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |blubban at gmail dot com

--- Comment #15 from Alfred Agrell <blubban at gmail dot com> ---
Just ran into this (and/or bug 98056). Still exists as of trunk-20220522.
Minimized to https://godbolt.org/z/qhWWzKe4M


#include <coroutine>
#include <initializer_list>

class my_coro {
public:
        my_coro();
        class promise_type {
        public:
                my_coro get_return_object();
                std::suspend_never initial_suspend();
                std::suspend_never final_suspend() noexcept;
                void unhandled_exception();
        };
};

std::suspend_never inner(std::initializer_list<int>);

my_coro doesnt_work()
{
        co_await inner({ 1,2,3 });
}

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

* [Bug c++/103871] [11/12/13 Regression] co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
                   ` (15 preceding siblings ...)
  2022-05-23 10:26 ` [Bug c++/103871] [11/12/13 " blubban at gmail dot com
@ 2023-01-04 14:43 ` kiwixz at outlook dot com
  2023-03-15 19:32 ` jason at gcc dot gnu.org
                   ` (6 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: kiwixz at outlook dot com @ 2023-01-04 14:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from kiwixz at outlook dot com ---
Hi, I wonder if there is any update on this ?

It's still present in trunk, and I would like to upgrade from GCC 10 to latest.

Is it worth just applying the workaround for now or does it have a chance to be
fixed in GCC 13 ?

Thanks,

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

* [Bug c++/103871] [11/12/13 Regression] co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
                   ` (16 preceding siblings ...)
  2023-01-04 14:43 ` kiwixz at outlook dot com
@ 2023-03-15 19:32 ` jason at gcc dot gnu.org
  2023-03-15 22:29 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jason at gcc dot gnu.org @ 2023-03-15 19:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #17 from Jason Merrill <jason at gcc dot gnu.org> ---
Iain, do you want to attach your WIP here so someone else can finish it up?  Or
do you expect to finish it within the next month?

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

* [Bug c++/103871] [11/12/13 Regression] co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
                   ` (17 preceding siblings ...)
  2023-03-15 19:32 ` jason at gcc dot gnu.org
@ 2023-03-15 22:29 ` cvs-commit at gcc dot gnu.org
  2023-03-16  2:48 ` [Bug c++/103871] [11/12 " jason at gcc dot gnu.org
                   ` (4 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-15 22:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

https://gcc.gnu.org/g:ea4dd8f512979db247c54d6b41377bb73699bcd7

commit r13-6702-gea4dd8f512979db247c54d6b41377bb73699bcd7
Author: Jason Merrill <jason@redhat.com>
Date:   Wed Mar 15 16:33:37 2023 -0400

    c++: co_await and initializer_list [PR103871]

    When flatten_await_stmt processes the backing array for an
initializer_list,
    we call cp_build_modify_expr to initialize the promoted variable from the
    TARGET_EXPR; that needs to be accepted.

            PR c++/103871
            PR c++/98056

    gcc/cp/ChangeLog:

            * typeck.cc (cp_build_modify_expr): Allow array initialization of
            DECL_ARTIFICIAL variable.

    gcc/testsuite/ChangeLog:

            * g++.dg/coroutines/co-await-initlist1.C: New test.

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

* [Bug c++/103871] [11/12 Regression] co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
                   ` (18 preceding siblings ...)
  2023-03-15 22:29 ` cvs-commit at gcc dot gnu.org
@ 2023-03-16  2:48 ` jason at gcc dot gnu.org
  2023-04-18 20:45 ` [Bug c++/103871] [11/12 Regression] coroutines: " cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jason at gcc dot gnu.org @ 2023-03-16  2:48 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[11/12/13 Regression]       |[11/12 Regression] co_await
                   |co_await causes build error |causes build error

--- Comment #19 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for GCC 13 so far.

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

* [Bug c++/103871] [11/12 Regression] coroutines: co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
                   ` (19 preceding siblings ...)
  2023-03-16  2:48 ` [Bug c++/103871] [11/12 " jason at gcc dot gnu.org
@ 2023-04-18 20:45 ` cvs-commit at gcc dot gnu.org
  2023-04-22  0:22 ` [Bug c++/103871] [11 " cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-18 20:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #20 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:1da2d99c632a90e5af55c8f8db1c11af587bb0a0

commit r12-9434-g1da2d99c632a90e5af55c8f8db1c11af587bb0a0
Author: Jason Merrill <jason@redhat.com>
Date:   Wed Mar 15 16:33:37 2023 -0400

    c++: co_await and initializer_list [PR103871]

    When flatten_await_stmt processes the backing array for an
initializer_list,
    we call cp_build_modify_expr to initialize the promoted variable from the
    TARGET_EXPR; that needs to be accepted.

            PR c++/103871
            PR c++/98056

    gcc/cp/ChangeLog:

            * typeck.cc (cp_build_modify_expr): Allow array initialization of
            DECL_ARTIFICIAL variable.

    gcc/testsuite/ChangeLog:

            * g++.dg/coroutines/co-await-initlist1.C: New test.

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

* [Bug c++/103871] [11 Regression] coroutines: co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
                   ` (20 preceding siblings ...)
  2023-04-18 20:45 ` [Bug c++/103871] [11/12 Regression] coroutines: " cvs-commit at gcc dot gnu.org
@ 2023-04-22  0:22 ` cvs-commit at gcc dot gnu.org
  2023-04-29  9:48 ` iains at gcc dot gnu.org
  2023-07-07  9:14 ` rguenth at gcc dot gnu.org
  23 siblings, 0 replies; 25+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-22  0:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #21 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:998e77e55126269b3e67b2f05f0f27a421839673

commit r11-10641-g998e77e55126269b3e67b2f05f0f27a421839673
Author: Jason Merrill <jason@redhat.com>
Date:   Wed Mar 15 16:33:37 2023 -0400

    c++: co_await and initializer_list [PR103871]

    When flatten_await_stmt processes the backing array for an
initializer_list,
    we call cp_build_modify_expr to initialize the promoted variable from the
    TARGET_EXPR; that needs to be accepted.

            PR c++/103871
            PR c++/98056

    gcc/cp/ChangeLog:

            * typeck.c (cp_build_modify_expr): Allow array initialization of
            DECL_ARTIFICIAL variable.

    gcc/testsuite/ChangeLog:

            * g++.dg/coroutines/co-await-initlist1.C: New test.

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

* [Bug c++/103871] [11 Regression] coroutines: co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
                   ` (21 preceding siblings ...)
  2023-04-22  0:22 ` [Bug c++/103871] [11 " cvs-commit at gcc dot gnu.org
@ 2023-04-29  9:48 ` iains at gcc dot gnu.org
  2023-07-07  9:14 ` rguenth at gcc dot gnu.org
  23 siblings, 0 replies; 25+ messages in thread
From: iains at gcc dot gnu.org @ 2023-04-29  9:48 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #22 from Iain Sandoe <iains at gcc dot gnu.org> ---
back ported to 11

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

* [Bug c++/103871] [11 Regression] coroutines: co_await causes build error
  2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
                   ` (22 preceding siblings ...)
  2023-04-29  9:48 ` iains at gcc dot gnu.org
@ 2023-07-07  9:14 ` rguenth at gcc dot gnu.org
  23 siblings, 0 replies; 25+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07  9:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103871
Bug 103871 depends on bug 98056, which changed state.

Bug 98056 Summary: coroutines: ICE tree check: expected record_type or union_type or qual_union_type, have array_type since r11-2183-g0f66b8486cea8668
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98056

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

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

end of thread, other threads:[~2023-07-07  9:14 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-31  0:44 [Bug c++/103871] New: [11.2.1/12 Regression] co_await causes build error egor.pugin at gmail dot com
2021-12-31  0:46 ` [Bug c++/103871] " egor.pugin at gmail dot com
2021-12-31  9:36 ` [Bug c++/103871] [11/12 " egor.pugin at gmail dot com
2021-12-31 10:39 ` jakub at gcc dot gnu.org
2021-12-31 11:47 ` iains at gcc dot gnu.org
2022-03-02 20:59 ` mpolacek at gcc dot gnu.org
2022-03-02 22:41 ` iains at gcc dot gnu.org
2022-03-03  0:36 ` mpolacek at gcc dot gnu.org
2022-03-20 12:36 ` sks_f at mail dot ru
2022-04-06 21:55 ` jason at gcc dot gnu.org
2022-04-06 22:03 ` iains at gcc dot gnu.org
2022-04-12 19:16 ` iains at gcc dot gnu.org
2022-04-13  6:25 ` rguenth at gcc dot gnu.org
2022-04-13 14:25 ` jason at gcc dot gnu.org
2022-04-13 14:45 ` iains at gcc dot gnu.org
2022-04-13 14:46 ` iains at gcc dot gnu.org
2022-05-23 10:26 ` [Bug c++/103871] [11/12/13 " blubban at gmail dot com
2023-01-04 14:43 ` kiwixz at outlook dot com
2023-03-15 19:32 ` jason at gcc dot gnu.org
2023-03-15 22:29 ` cvs-commit at gcc dot gnu.org
2023-03-16  2:48 ` [Bug c++/103871] [11/12 " jason at gcc dot gnu.org
2023-04-18 20:45 ` [Bug c++/103871] [11/12 Regression] coroutines: " cvs-commit at gcc dot gnu.org
2023-04-22  0:22 ` [Bug c++/103871] [11 " cvs-commit at gcc dot gnu.org
2023-04-29  9:48 ` iains at gcc dot gnu.org
2023-07-07  9:14 ` rguenth 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).