This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran] PR54301 - add warning for pointer might outlive its target
- From: Thomas Koenig <tkoenig at netcologne dot de>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: gcc patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Sun, 19 Aug 2012 21:19:39 +0200
- Subject: Re: [Patch, Fortran] PR54301 - add warning for pointer might outlive its target
- References: <50311112.3060908@net-b.de>
Hi Tobias,
Build and regtested on x86-64-gnu-linux.
OK for the trunk?
I would exclude pointers on the lhs of the pointer assignment, to make
sure that warnings for code such as
program main
integer :: i
integer, pointer :: ip
block
integer, pointer :: jp
allocate (jp)
jp = 3
ip => jp
end block
i = ip
print *,i
end program main
are not emitted.
Thomas