[Bug c++/102656] New: ICE on coroutines on -fsanitize=address -O1
dprokoptsev at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Oct 8 21:03:05 GMT 2021
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; }
More information about the Gcc-bugs
mailing list