gcc/fortran/ChangeLog:
PR fortran/102917
* decl.c (match_attr_spec): Remove invalid integer kind checks on
KIND and LEN attributes of PDTs.
gcc/testsuite/ChangeLog:
PR fortran/102917
* gfortran.dg/pdt_4.f03: Adjust testcase.
(cherry picked from commit
cfcb27cfcb1d32b8cf7bc463cc1fc5cacae8d199)
m = MATCH_ERROR;
goto cleanup;
}
- if (current_ts.kind != gfc_default_integer_kind)
- {
- gfc_error ("Component with KIND attribute at %C must be "
- "default integer kind (%d)",
- gfc_default_integer_kind);
- m = MATCH_ERROR;
- goto cleanup;
- }
}
else if (d == DECL_LEN)
{
m = MATCH_ERROR;
goto cleanup;
}
- if (current_ts.kind != gfc_default_integer_kind)
- {
- gfc_error ("Component with LEN attribute at %C must be "
- "default integer kind (%d)",
- gfc_default_integer_kind);
- m = MATCH_ERROR;
- goto cleanup;
- }
}
else
{
type :: bad_pdt (a,b, c, d) ! { dg-error "does not have a component" }
real, kind :: a ! { dg-error "must be INTEGER" }
- INTEGER(8), kind :: b ! { dg-error "be default integer kind" }
+ INTEGER(8), kind :: b
real, LEN :: c ! { dg-error "must be INTEGER" }
- INTEGER(8), LEN :: d ! { dg-error "be default integer kind" }
+ INTEGER(8), LEN :: d
end type
type :: mytype (a,b)