This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] testsuite: Nullify pointers before first usage.
- From: Bernhard Heckel <bernhard dot heckel at intel dot com>
- To: brobecker at adacore dot com
- Cc: gdb-patches at sourceware dot org, "bernhard.heckel" <bernhard dot heckel at intel dot com>
- Date: Mon, 22 Feb 2016 15:49:16 +0100
- Subject: [PATCH] testsuite: Nullify pointers before first usage.
- Authentication-results: sourceware.org; auth=none
- References: <1456152558-3962-1-git-send-email-bernhard dot heckel at intel dot com>
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