testsuite: Nullify pointers before first usage.

Nullify pointers to avoid an undefined association status.

2016-03-02  Bernhard Heckel  <bernhard.heckel@intel.com>

gdb/testsuite/Changelog:

     * gdb.mi/vla.f90: Nullify pointer after declaration.
This commit is contained in:
Bernhard Heckel 2016-03-02 16:36:37 +01:00
parent 650beae39d
commit 178073690a
2 changed files with 5 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2016-03-02 Bernhard Heckel <bernhard.heckel@intel.com>
* gdb.mi/vla.f90: Nullify pointer after declaration.
2016-03-01 Pedro Alves <palves@redhat.com>
* gdb.trace/ftrace-lock.c: Include <unistd.h>.

View File

@ -18,6 +18,7 @@ program vla
real, target, allocatable :: vla2(:, :)
real, pointer :: pvla2 (:, :)
logical :: l
nullify (pvla2)
allocate (vla1 (5)) ! vla1-not-allocated
l = allocated(vla1) ! vla1-allocated