This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/29616] Run-time check using nullified pointers and deallocated variables
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Mar 2007 22:30:29 -0000
- Subject: [Bug fortran/29616] Run-time check using nullified pointers and deallocated variables
- References: <bug-29616-1719@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from burnus at gcc dot gnu dot org 2007-03-22 22:30 -------
Besides pointers, the same is also true for deallocated variables, only that
the unknown state does not exist. (Idea taken from 31318)
> I think there are essentially two problems possible with pointers:
> (a) Uninitialized pointer (i.e. neither NULL nor associated)
> (b) Using an unassociated pointer
> I think checking (a) is not easily doable as one would need to pass this
> status (has been initialized? yes/no) on to subroutines.
(a) should be possible if one restricts oneself to restricts oneself to local
variables. If they are passed as actual argument to non-pointer (or
non-allocatable) dummies, this is also an error.
For allocatable variables the checking is always possible.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Run-time check using |Run-time check using
|nullified pointers |nullified pointers and
| |deallocated variables
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29616