https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114308
--- Comment #14 from anlauf at gcc dot gnu.org --- (In reply to kargls from comment #13) > (In reply to anlauf from comment #11) > > Created attachment 58926 [details] > > Patch > > > > This patch applies the check of the declared type in resolve_array_list, > > where there is already a check for unlimited polymorphic elements. > > > > Will submit if it regtests ok. > > Looks good except don't you also need to check c->expr->ts.type == > BT_DERIVED. > > One can have > > type, abstract :: a > ... > end type a > > Or, does the 'abstract' attribute cause gfortran to use BT_CLASS? Can you construct a testcase which is missed? type(a) :: a_instance is already rejected with Error: 'a_instance' at (1) is of the ABSTRACT type 'a' from which I took over the wording. See also F2018:C703: The derived-type-spec shall not specify an abstract type (7.5.7).