pgfortran 17.10 appears not to support Fortran 2008’s empty contains, but the Fortran 2003 program
contains subroutine s end end
results in an ICE. The Fortran 2008 version without the subroutine also gives a misleading rejection message:
PGF90-S-0155-Internal subprograms may not be nested
Further, for the invalid source
program contains end
the compiler reports the syntax error, but the compiler process does not return (on my system).