https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102003
Bug ID: 102003 Summary: [PDT] Length of character component not simplified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: anlauf at gcc dot gnu.org Target Milestone: --- We should be able to simplify at compile time the following code: type pdt(n) integer, len :: n = 8 character(len=n) :: c end type pdt type(pdt(42)) :: p integer, parameter :: m = len (p% c) ! rejected print *, len (p% c) == 42 ! works, but not simplified end Instead we currently get: foo.f90:6:27: 6 | integer, parameter :: m = len (p% c) ! rejected | 1 Error: Cannot convert UNKNOWN to INTEGER(4) at (1) (The code is accepted by Intel.)