https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91316
--- Comment #5 from Paul Thomas <pault at gcc dot gnu.org> --- Hi Jose, This is fixed to the extent that it behaves in the same way as ifort. nagfor, on the other hand, gives: [pault@pc30 pr37336]$ rm ./a.out;nagfor pr91316.f90 -g;./a.out NAG Fortran Compiler Release 7.1(Hanzomon) Build 7115 Error: pr91316.f90, line 39: Finaliser FINAL_END for INTENT(OUT) dummy THIS (no. 1) of pure procedure FINAL_INIT is not pure Errors in declarations, no further processing for FINAL_INIT Error: pr91316.f90, line 48: Rank 0 type FINAL_T result variable of pure function FINAL_SET will invoke an impure final subroutine Errors in declarations, no further processing for FINAL_SET Malcolm Cohen has convinced me that this error is correct. Setting the elemental functions to be impure recovers the expected behaviour with nagfor. I will keep this PR open as a place holder for this nit. Regards Paul