This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran] PR54301 - add warning for pointer might outlive its target


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]