https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113263
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Keywords| |ice-checking,
| |ice-on-invalid-code
Last reconfirmed| |2024-01-08
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
It has nothing to do with the return type.
Rather it is just an initialization that is causing the issue with the type
defined there and an anonymous union.
Reduced testcase:
```
void
maybe_make_thing(void)
{
(struct { union { bool _err; }; })
{ ._err = 1, } ;
}
```
Confirmed, looks like it is only and ICE with checking too.
```
<source>: In function 'void maybe_make_thing()':
<source>:5:20: error: 'maybe_make_thing()::<unnamed union>::_err' is not a
direct member of 'maybe_make_thing()::<unnamed struct>'
5 | { ._err = 1, } ;
| ^
```