A program with an empty CONTAINS block is illegal, but gfortran accepts it: PROGRAM test197 CONTAINS END PROGRAM test197
> A program with an empty CONTAINS block is illegal Well, this is a matter of arguments. It is invalid in Fortran 90, 95 and 2003. But it is allowed in the current draft for Fortran 2008. Therefore, we decided to allowed it by default. Use -std=f2003 or -std=f95 to print an error. END PROGRAM test197 1 Error: Extension: CONTAINS statement without FUNCTION or SUBROUTINE statement at (1)