This repo is a minimal example to show nvfortran compiler issue with when dealing with Parameterized Derived Types (pdt) when using abstract types. A minimal working example reduced from ICON codebase.
The program contains:
- Type (
t_pdt) - parameterized derived type with a kind parameter - Type (
t_base) - Abstract type with deferred functionfunc, which takes parametert_pdtwithkind=real64 - Type (
t_ext) - Non-abstract, concretized type extension oft_basewhich definesfunc
Two files are given:
f1.90: Intended code structuret_pdtdefined inmo_pdtt_basedefined inmo_baset_extdefined inmo_ext
f2.90: Incompatible code structure, used purely for debuggingt_pdtdefined inmo_pdt_base_extt_basedefined inmo_pdt_base_extt_extdefined inmo_pdt_base_ext
Testing on Levante with compilers:
nvhpc@22.5nvhpc@24.9gcc@11.2.0intel@2021.5.0nag@7.1.1
Usage:
make SRC=f1.f90make SRC=f2.f90
Compilation (y/n):
| nvhpv@22.5 | nvhpc@24.9 | gcc@11.2.0 | intel@2021.5.0 | nag@7.1.1 | |
|---|---|---|---|---|---|
| f1.90 | n | n | y* | y | y |
| f2.90 | y | y | n | y | y |