is_elemental, where))
return false;
- /* TS 29113, 6.3p2. */
+ /* TS 29113, 6.3p2; F2018 15.5.2.4. */
if (f->sym->ts.type == BT_ASSUMED
&& (a->expr->ts.type == BT_DERIVED
|| (a->expr->ts.type == BT_CLASS && CLASS_DATA (a->expr))))
{
- gfc_namespace *f2k_derived;
-
- f2k_derived = a->expr->ts.type == BT_DERIVED
- ? a->expr->ts.u.derived->f2k_derived
- : CLASS_DATA (a->expr)->ts.u.derived->f2k_derived;
-
- if (f2k_derived
- && (f2k_derived->finalizers || f2k_derived->tb_sym_root))
+ gfc_symbol *derived = (a->expr->ts.type == BT_DERIVED
+ ? a->expr->ts.u.derived
+ : CLASS_DATA (a->expr)->ts.u.derived);
+ gfc_namespace *f2k_derived = derived->f2k_derived;
+ if (derived->attr.pdt_type
+ || (f2k_derived
+ && (f2k_derived->finalizers || f2k_derived->tb_sym_root)))
{
- gfc_error ("Actual argument at %L to assumed-type dummy is of "
+ gfc_error ("Actual argument at %L to assumed-type dummy "
+ "has type parameters or is of "
"derived type with type-bound or FINAL procedures",
&a->expr->where);
return false;
type(t4) :: a4
call s1 (a1) ! OK
- call s1 (a2) ! { dg-error "assumed-type dummy" "pr101319" { xfail *-*-* } }
+ call s1 (a2) ! { dg-error "assumed-type dummy" }
call s1 (a3) ! { dg-error "assumed-type dummy" }
call s1 (a4) ! { dg-error "assumed-type dummy" }
end subroutine