This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

[PATCH] testsuite: Nullify pointers before first usage.


From: "bernhard.heckel" <bernhard.heckel@intel.com>

Nullify pointers to avoid an undefined association status.

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

gdb/Changelog:

     * vla.f90: Nullify pointer after declaration.

---
 gdb/testsuite/gdb.mi/vla.f90 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gdb/testsuite/gdb.mi/vla.f90 b/gdb/testsuite/gdb.mi/vla.f90
index 10c3dcc..c3e48dc 100644
--- a/gdb/testsuite/gdb.mi/vla.f90
+++ b/gdb/testsuite/gdb.mi/vla.f90
@@ -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
-- 
2.7.1.339.g0233b80


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