Sorry if this is a dup. Is there any reason why with -fwhole-file we don't warn about: subroutine foo(ptr, ptr2, f) integer, pointer :: ptr(:), ptr2(:) logical :: f if (f) then allocate (ptr(6)) else nullify(ptr) end if end subroutine subroutine bar() real, pointer :: ptr(:), ptr2(:) real, target :: a(6) interface subroutine foo(ptr, ptr2, f) real, pointer :: ptr(:), ptr2(:) logical :: f end subroutine end interface ptr2 = a call foo(ptr, ptr2, .true.) ptr = a + 6 end subroutine
? -- Summary: -fwhole-file doesn't warn about INTERFACE vs. definition mismatches Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jakub at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45654