https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123411
--- Comment #5 from Iain Buclaw <ibuclaw at gcc dot gnu.org> ---
(In reply to Iain Buclaw from comment #4)
> The above expansion is pretty much the full reduction.
>
> Prettified reduction.
> ```
> enum SDL_JoystickType
> {
> unknown
> }
> enum : SDL_JoystickType
> {
> SDL_JOYSTICK_TYPE_UNKNOWN
> }
>
> alias _pSDL_GetJoystickTypeForID = SDL_JoystickType function();
>
> _pSDL_GetJoystickTypeForID _SDL_GetJoystickTypeForID;
>
> SDL_JoystickType SDL_GetJoystickTypeForID()
> {
> return _SDL_GetJoystickTypeForID();
> }
> ```
Anonymised and reduced even further.
```
enum E
{
unknown
}
enum : E
{
E_UNKNOWN
}
E test()
{
return E.unknown; // or E_UNKNOWN
}
```