aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/gdb.base/max-depth.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/max-depth.c b/gdb/testsuite/gdb.base/max-depth.c
index fee5de5..7e46b13 100644
--- a/gdb/testsuite/gdb.base/max-depth.c
+++ b/gdb/testsuite/gdb.base/max-depth.c
@@ -225,8 +225,17 @@ struct V7 : virtual V4, virtual V5, virtual V6 { int v7 = 1; } v7;
#endif /* __cplusplus */
+void Do_nothing (struct s1 sone)
+{
+ /* This Function does nothing. */
+}
+
int
main ()
{
+ /* In targets like AIX, linker optimises out unused global
+ variables. The do_nothing () function stops the linker
+ from doing so. */
+ Do_nothing (s1);
return 0;
}