This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] testsuite: Nullify pointers before first usage.
- From: Bernhard Heckel <bernhardheckel at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 2 Mar 2016 15:32:09 -0000
- Subject: [binutils-gdb] testsuite: Nullify pointers before first usage.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=178073690aec73fdb5f4452b49f108407edde700
commit 178073690aec73fdb5f4452b49f108407edde700
Author: Bernhard Heckel <bernhard.heckel@intel.com>
Date: Wed Mar 2 16:36:37 2016 +0100
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.
Diff:
---
gdb/testsuite/ChangeLog | 4 ++++
gdb/testsuite/gdb.mi/vla.f90 | 1 +
2 files changed, 5 insertions(+)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index aeb2837..e14b654 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -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>.
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