https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124598
--- Comment #4 from Antoine Lemoine <[email protected]> --- (In reply to Steve Kargl from comment #2) > (In reply to anlauf from comment #1) > > [...] > > 'n' is a type-param-name in 'type(t_baz(n)) :: baz'. OP's code is likely > invalid because 'n' does not appear in an specification expression. > > However, if one changes the code to > > type(t_baz) :: baz ! <- REMOVE THIS LINE AND THIS PROGRAM COMPILES > > or > > type(t_baz(n=10)) :: baz ! <- REMOVE THIS LINE AND THIS PROGRAM COMPILES > This mistake occurred when I created the minimal example. In the actual code where the ICE happened, n was assigned a value such as type(t_baz(3)). So, what I intended to do is valid.
