https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124598
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2026-03-23
Status|UNCONFIRMED |WAITING
--- Comment #1 from anlauf at gcc dot gnu.org ---
I do not get an ICE with 16-trunk; the testcase gets (correctly) rejected:
pr124958.f90:18:14:
18 | type(t_baz(n)) :: baz ! <- REMOVE THIS LINE AND THIS PROGRAM
COMPILES
| 1
Error: The type parameter expression at (1) must be of INTEGER type and not
UNKNOWN
Intel also rejects it:
pr124958.f90(18): error #6219: This variable, used in a specification
expression, must be a dummy argument, a COMMON block object, or an object
accessible through host or use association. [N]
type(t_baz(n)) :: baz ! <- REMOVE THIS LINE AND THIS PROGRAM COMPILES
--------------^
pr124958.f90(18): error #6591: An automatic object is invalid in a main
program. [BAZ]
type(t_baz(n)) :: baz ! <- REMOVE THIS LINE AND THIS PROGRAM COMPILES
---------------------^
compilation aborted for pr124958.f90 (code 1)
Note that 15-branch generates a different error message, so that I think
that the ICE you see has been fixed recently on mainline.