https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108489
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target| |x86_64-linux-gnu Component|c++ |target Keywords| |GC, ice-on-valid-code --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Add --param ggc-min-expand=0 --param ggc-min-heapsize=0 gets a different crash and it only crashes on x86_64-linux-gnu (aarch64-linux-gnu seems to work). Get a different crash with -g also. There is some GC issue going on too dealing with <retval> RTL. The gimple IR at this point: _5 = operator new (40); _5->_Coro_frame_needs_free = 1; _5->_Coro_resume_fn = example; _5->_Coro_destroy_fn = example; <retval>.value = 0; <retval>.m_handle = 0B; _5->_Coro_resume_index = 0; example (_5); return <retval>; The crash happens while expanding: <retval>.value = 0; (I think) I am not 100% sure this is valid gimple IR with a call between the assignment of <retval> and the return. But it might also be valid and then the bug is the target backend I think. Also the struct needs the following sized fields with the padding (you can't even be explict with the padding either): int t = 0; long t1 = 0;