https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63153

            Bug ID: 63153
           Summary: pointers are not nullified with  -finit-local-zero
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Joost.VandeVondele at mat dot ethz.ch

scalar pointers are not nullified with -finit-local-zero . After the fix for
PR63152, also arrays with the pointer attribute might need this.

> cat bug.f90
 SUBROUTINE S1()
   INTEGER, POINTER :: w
   IF (ASSOCIATED(w)) CALL ABORT()
 END SUBROUTINE S1

> gfortran -fdump-tree-original -finit-local-zero -g -c bug.f90
> cat bug.f90.003t.original 
s1 ()
{
  integer(kind=4) * w;

  if (w != 0B)
    {
      _gfortran_abort ();
    }
  L.1:;
}

Reply via email to