public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102656] New: ICE on coroutines on -fsanitize=address -O1
@ 2021-10-08 21:03 dprokoptsev at gmail dot com
  2021-10-08 21:30 ` [Bug c++/102656] " dprokoptsev at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: dprokoptsev at gmail dot com @ 2021-10-08 21:03 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102656
           Summary: ICE on coroutines on -fsanitize=address -O1
           Product: gcc
           Version: 11.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dprokoptsev at gmail dot com
  Target Milestone: ---

Here's the minimal example I've been able to come up with:

// ICEs on -fcoroutines -O1 -fsanitize=address, on any gcc version between 10.2
and trunk (does compile though on 10.1), checked on godbolt.

#include <coroutine>
/* 2*/ class promise;
/* 3*/
/* 4*/ struct future {
/* 5*/     using promise_type = promise;
/* 6*/     future() = default;
/* 7*/     int x = 0;  // commenting out this line resolves the ICE
/* 8*/ };
/* 9*/ 
/*10*/ class promise {
/*11*/  public:
/*12*/    future get_return_object() noexcept { return {}; }
/*13*/    auto initial_suspend() noexcept { return std::suspend_never{}; }
/*14*/    auto final_suspend() noexcept { return std::suspend_never{}; }
/*15*/
/*16*/    void return_void() noexcept {}
/*17*/    void unhandled_exception() {}
/*18*/};
/*19*/
/*20*/ future func() { co_return; }

gcc-10.2 [x86-64] yields
<source>:20:28: internal compiler error: in expand_expr_addr_expr_1, at
expr.c:8075
   20 | future func() { co_return; }

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

end of thread, other threads:[~2022-05-10  8:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08 21:03 [Bug c++/102656] New: ICE on coroutines on -fsanitize=address -O1 dprokoptsev at gmail dot com
2021-10-08 21:30 ` [Bug c++/102656] " dprokoptsev at gmail dot com
2021-10-11 10:39 ` [Bug c++/102656] [11/12 Regression] ICE on coroutines on -fsanitize=address -O1 since r11-1613-g788b962aa00959e8 marxin at gcc dot gnu.org
2021-11-05 13:25 ` rguenth at gcc dot gnu.org
2022-02-17 16:17 ` [Bug sanitizer/102656] " jakub at gcc dot gnu.org
2022-02-19  8:05 ` cvs-commit at gcc dot gnu.org
2022-02-19  8:09 ` [Bug sanitizer/102656] [11 " jakub at gcc dot gnu.org
2022-03-29  5:53 ` cvs-commit at gcc dot gnu.org
2022-03-30  8:14 ` jakub at gcc dot gnu.org
2022-05-10  8:24 ` cvs-commit 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).