Code compiles with nvfortran but fails with gfortran - derived type not recognized

· Fortran Lang Discourse · Aug. 6, 2026, 3:45 a.m.
Summary
The blog post discusses a compilation issue encountered when using the GNU Fortran compiler (gfortran) with a Fortran program that works with the NVIDIA Fortran compiler (nvfortran). It presents the code for a derived type 'car' and the associated subroutine for creating a car instance, along with the specific compilation errors thrown by gfortran, emphasizing the differences in handling derived types between the two compilers.