https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117077
anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2024-10-11 Status|UNCONFIRMED |NEW Keywords| |ice-on-valid-code Priority|P3 |P4 --- Comment #1 from anlauf at gcc dot gnu.org --- Confirmed. Moving the declaration of type foo_type from the function to the module prevents the ICE, even if it is declared private. Otherwise we miss the result type information of function foo in the generated .mod file.