https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90140
Dominique d'Humieres <dominiq at lps dot ens.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P4 Status|UNCONFIRMED |NEW Last reconfirmed| |2019-04-30 Ever confirmed|0 |1 --- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- Confirmed from 7.4.0 up to trunk (10.0). From 4.9 up to 6.5.0 the errors are pr90140.f90:38:35: real(wp), dimension(ncol,nlay, this%get_ngas()) :: vmr 1 Error: 'get_ngas' at (1) should be a FUNCTION pr90140.f90:39:37: real(wp), dimension(ncol,nlay,0:this%get_ngas()) :: col_gas 1 Error: 'get_ngas' at (1) should be a FUNCTION The behavior changed between revisions r247817 (2017-05-09, two errors) and r248367 (2017-05-23, three errors) and the change has been back ported to the GCC7 branch. For 4.8.5 I get additional errors Error: Function 'this' at (1) must be PURE Work around: replace this%get_ngas() with get_ngas(this).