aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/scope1.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2009-12-28 21:45:24 +0000
committerDaniel Jacobowitz <drow@false.org>2009-12-28 21:45:24 +0000
commit0219b378ea49d403ec68b0a1e36ad356930ab38d (patch)
tree66b7480b56ab5e8e6e8bd8ca112ba46b38a653d6 /gdb/testsuite/gdb.base/scope1.c
parent0fe7935b333f7332ffd501dc45ff73ceec09b45f (diff)
downloadgdb-0219b378ea49d403ec68b0a1e36ad356930ab38d.zip
gdb-0219b378ea49d403ec68b0a1e36ad356930ab38d.tar.gz
gdb-0219b378ea49d403ec68b0a1e36ad356930ab38d.tar.bz2
* gdb.base/find.c (main): Reference search buffers.
* gdb.base/included.c (main): Reference integer. * gdb.base/ptype.c (charfoo): Declare. (intfoo): Call charfoo. * gdb.base/scope0.c (useitp): New function. (usestatics): Use useitp. (useit): Add a type for val. * gdb.base/scope1.c (useit1): Take a pointer argument. (usestatics1): Update calls to useit1. * gdb.cp/call-c.cc: Declare foo. (main): Call foo. * gdb.cp/m-static.cc (main): Reference test4.elsewhere. * gdb.cp/namespace.cc (ensureOtherRefs): Declare. (main): Call C::ensureRefs and ensureOtherRefs. * gdb.cp/namespace1.cc (C::ensureOtherRefs): Also reference int variables. (ensureOtherRefs): New function. * gdb.cp/overload.cc (main): Call all overloadNamespace variants. * gdb.cp/templates.cc (main): Call t5i.value.
Diffstat (limited to 'gdb/testsuite/gdb.base/scope1.c')
-rw-r--r--gdb/testsuite/gdb.base/scope1.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gdb/testsuite/gdb.base/scope1.c b/gdb/testsuite/gdb.base/scope1.c
index 8c32522..2631ead 100644
--- a/gdb/testsuite/gdb.base/scope1.c
+++ b/gdb/testsuite/gdb.base/scope1.c
@@ -32,23 +32,24 @@ void init1 ()
}
/* On some systems, such as AIX, unreferenced variables are deleted
- from the executable. */
+ from the executable. On other compilers, such as ARM RealView,
+ const variables without their address taken are deleted. */
void usestatics1 ()
{
- void useit1 (int val);
+ void useit1 (const int *val);
- useit1 (filelocal);
- useit1 (filelocal_bss);
- useit1 (filelocal_ro);
+ useit1 (&filelocal);
+ useit1 (&filelocal_bss);
+ useit1 (&filelocal_ro);
}
#ifdef PROTOTYPES
-void useit1 (int val)
+void useit1 (const int *val)
#else
-void useit1 (val) int val;
+void useit1 (val) const int *val;
#endif
{
static int usedval;
- usedval = val;
+ usedval = *val;
}