aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/relocate.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.base/relocate.c')
-rw-r--r--gdb/testsuite/gdb.base/relocate.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/relocate.c b/gdb/testsuite/gdb.base/relocate.c
index edf0191..4415b53 100644
--- a/gdb/testsuite/gdb.base/relocate.c
+++ b/gdb/testsuite/gdb.base/relocate.c
@@ -33,3 +33,10 @@ function_bar ()
{
return 6;
}
+
+/* Make sure the statics are not optimized away. */
+int *
+hack (int arg)
+{
+ return arg ? &static_foo : &static_bar;
+}