https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84143
Bug ID: 84143 Summary: Intrinsic output of PDT incorrectly includes type parameters Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: neil.n.carlson at gmail dot com Target Milestone: --- In the continuing theme of the PDT implementation incorrectly regarding type parameters as components (see PR84119, PR84120, PR84122), the current implementation includes the type parameters when outputting a PDT: type foo(k1,l1) integer,kind :: k1=1 integer,len :: l1=2 integer :: n=3 end type type(foo) :: x character(8) :: string write(string,'(*(i0))') x ! THIS SHOULD WRITE THE SINGLE DIGIT 3 if (len_trim(string) /= 1) stop 1 end GFortran is bailing at the STOP 1 because it gets 3 for len_trim(string). 1.3.33 and R435 (F08) define what a component is. Type parameters R431 are something else, and not included in the intrinsic output of the derived type. I didn't check, but I'd guess the analogous incorrect thing occurs for input.