testsuite: Nullify pointers before first usage.
authorBernhard Heckel <bernhard.heckel@intel.com>
Wed, 2 Mar 2016 15:36:37 +0000 (16:36 +0100)
committerBernhard Heckel <bernhard.heckel@intel.com>
Wed, 2 Mar 2016 15:36:37 +0000 (16:36 +0100)
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.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.mi/vla.f90

index aeb28376aac08a23806a23763e7fa5af3b96b735..e14b6540a4f531288e71636825a931c81e5a9f2f 100644 (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>.
index 10c3dcce94df5defde667f76950080fe18c94394..c3e48dcd0b623238e9f88e884dc5b9066d1accb1 100644 (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