I believe the following program is valid; it is compiled by g95, ifort, NAG f95, but gfortran rejects it with:
Error: Expression at (1) must be of INTEGER type For the for KIND we had a similar problem, see PR fortran/31154 PR fortran/31229 PR fortran/33334 and PR 34254 module m integer, parameter :: strlen = 5 end module m character(strlen) function test() use m test = 'A' end function test -- Summary: Fails: character(len=use_associated_const) function foo() Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org OtherBugsDependingO 32834 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34429