https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78171
Bug ID: 78171 Summary: example with undefined symbol compiles with '-O1 -fcheck=pointer' Product: gcc Version: 6.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: patrick.seewald at gmail dot com Target Milestone: --- This should not compile because 'foo' is undefined: PROGRAM example IMPLICIT NONE REAL, ALLOCATABLE, DIMENSION(:) :: array CALL foo(array) END PROGRAM example However it compiles with 'gfortran -O1 -fcheck=pointer example.f90'. If I run the executable, I get: At line 4 of file example.f90 Fortran runtime error: Allocatable actual argument 'array' is not allocated