Interesting output from gfortran when using parameterized derived types

@pcosta ,

Without you providing a reproducer one can try, it’s difficult to gage the issue. However do note the parameterized derived type (PDT) facility from way back in Fortran 2003 is effectively not supported in gfortran yet, particularly the length-type parameter you have attempted. Meaning, the number of bug scenarios far exceed the few cases where the feature works with gfortran.

On the other hand, IFORT compiler is in far better shape with PDTs. It is not without problems.
However if you are not using type-bound procedures, then the chances of success with using PDTs in IFORT are reasonably good. Over the years, I’ve submitted many, many bug reports (I’ve lost count actually) with Intel and a vast majority of the cases have been fixed by Intel.

I suggest you either try IFORT compiler in free Intel oneAPI or use a non-parametrized derived type with gfortran.

1 Like