aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2015-09-28 13:27:28 -0700
committerDoug Evans <dje@google.com>2015-09-28 13:27:28 -0700
commitc60eb31fb11129ee91b9f778b852f886db545381 (patch)
tree0b82afeb0dcac50419bbf652414f7c300e67c6eb /gdb/testsuite
parent245af5969525a0d1cdcb1c0c632587d5cec27646 (diff)
downloadgdb-c60eb31fb11129ee91b9f778b852f886db545381.zip
gdb-c60eb31fb11129ee91b9f778b852f886db545381.tar.gz
gdb-c60eb31fb11129ee91b9f778b852f886db545381.tar.bz2
gdb.base/gcore.c (array_func): Add reference to static_array.
Otherwise clang will delete it: it's otherwise unused. gdb/testsuite/ChangeLog: * gdb.base/gcore.c (array_func): Add reference to static_array.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.base/gcore.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 7d52ba0..344e633 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2015-09-28 Doug Evans <dje@google.com>
+
+ * gdb.base/gcore.c (array_func): Add reference to static_array.
+
2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
* gdb.gdb/selftest.exp (do_steps_and_nexts): Adjust expected
diff --git a/gdb/testsuite/gdb.base/gcore.c b/gdb/testsuite/gdb.base/gcore.c
index d6acc1f9..b6d8d54 100644
--- a/gdb/testsuite/gdb.base/gcore.c
+++ b/gdb/testsuite/gdb.base/gcore.c
@@ -46,6 +46,8 @@ array_func ()
un_initialized_array[i] = extern_array[i] + 8;
local_array[i] = extern_array[i] + 12;
}
+ /* Reference static_array so that clang doesn't discard it. */
+ (void) static_array[0];
terminal_func ();
}