diff options
author | Kevin Buettner <kevinb@redhat.com> | 2002-04-18 13:21:03 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2002-04-18 13:21:03 +0000 |
commit | e20049926b7a0204df8c5072bd6de93ef3f5ec0c (patch) | |
tree | abe1bc456340056ac855877981ff4308742df66f | |
parent | 7831a7758ee7bb1f41ab71472ab5bc9430b066de (diff) | |
download | gdb-e20049926b7a0204df8c5072bd6de93ef3f5ec0c.zip gdb-e20049926b7a0204df8c5072bd6de93ef3f5ec0c.tar.gz gdb-e20049926b7a0204df8c5072bd6de93ef3f5ec0c.tar.bz2 |
* gdb.base/cvexpr.c (use): New function.
(main): Invoke use() on all global variables to prevent
some linkers from deleting these otherwise unused symbols.
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/cvexpr.c | 156 |
2 files changed, 161 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 722ce17..9b9d136 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2002-04-18 Kevin Buettner <kevinb@redhat.com> + + * gdb.base/cvexpr.c (use): New function. + (main): Invoke use() on all global variables to prevent + some linkers from deleting these otherwise unused symbols. + 2002-04-17 Michael Chastain <mec@shout.net> From David S. Miller <davem@redhat.com> diff --git a/gdb/testsuite/gdb.base/cvexpr.c b/gdb/testsuite/gdb.base/cvexpr.c index 176bbe9..5871209 100644 --- a/gdb/testsuite/gdb.base/cvexpr.c +++ b/gdb/testsuite/gdb.base/cvexpr.c @@ -273,8 +273,162 @@ unsigned long long (*v_unsigned_long_long_func) (int, int*); float (*v_float_func) (int, int*); double (*v_double_func) (int, int*); - +void use (void *p) +{ +} int main () { + use (&v_char); + use (&v_signed_char); + use (&v_unsigned_char); + + use (&v_short); + use (&v_signed_short); + use (&v_unsigned_short); + + use (&v_int); + use (&v_signed_int); + use (&v_unsigned_int); + + use (&v_long); + use (&v_signed_long); + use (&v_unsigned_long); + + use (&v_long_long); + use (&v_signed_long_long); + use (&v_unsigned_long_long); + + use (&v_float); + use (&v_double); + + use (v_char_array); + use (v_signed_char_array); + use (v_unsigned_char_array); + + use (v_short_array); + use (v_signed_short_array); + use (v_unsigned_short_array); + + use (v_int_array); + use (v_signed_int_array); + use (v_unsigned_int_array); + + use (v_long_array); + use (v_signed_long_array); + use (v_unsigned_long_array); + + use (v_float_array); + use (v_double_array); + + use (v_char_pointer); + use (v_signed_char_pointer); + use (v_unsigned_char_pointer); + + use (v_short_pointer); + use (v_signed_short_pointer); + use (v_unsigned_short_pointer); + + use (v_int_pointer); + use (v_signed_int_pointer); + use (v_unsigned_int_pointer); + + use (v_long_pointer); + use (v_signed_long_pointer); + use (v_unsigned_long_pointer); + + use (v_float_pointer); + use (v_double_pointer); + + use (v_char_pointer_pointer); + use (v_signed_char_pointer_pointer); + use (v_unsigned_char_pointer_pointer); + + use (v_short_pointer_pointer); + use (v_signed_short_pointer_pointer); + use (v_unsigned_short_pointer_pointer); + + use (v_int_pointer_pointer); + use (v_signed_int_pointer_pointer); + use (v_unsigned_int_pointer_pointer); + + use (v_long_pointer_pointer); + use (v_signed_long_pointer_pointer); + use (v_unsigned_long_pointer_pointer); + + use (v_float_pointer_pointer); + use (v_double_pointer_pointer); + + use (v_char_array_pointer); + use (v_signed_char_array_pointer); + use (v_unsigned_char_array_pointer); + + use (v_short_array_pointer); + use (v_signed_short_array_pointer); + use (v_unsigned_short_array_pointer); + + use (v_int_array_pointer); + use (v_signed_int_array_pointer); + use (v_unsigned_int_array_pointer); + + use (v_long_array_pointer); + use (v_signed_long_array_pointer); + use (v_unsigned_long_array_pointer); + + use (v_float_array_pointer); + use (v_double_array_pointer); + + use (v_char_pointer_array); + use (v_signed_char_pointer_array); + use (v_unsigned_char_pointer_array); + + use (v_short_pointer_array); + use (v_signed_short_pointer_array); + use (v_unsigned_short_pointer_array); + + use (v_int_pointer_array); + use (v_signed_int_pointer_array); + use (v_unsigned_int_pointer_array); + + use (v_long_pointer_array); + use (v_signed_long_pointer_array); + use (v_unsigned_long_pointer_array); + + use (v_float_pointer_array); + use (v_double_pointer_array); + + use (&v_struct1); + use (&v_struct2); + use (&v_struct3); + + use (&v_union); + use (&v_union2); + use (&v_union3); + + use (&v_boolean); + use (&v_boolean2); + use (&v_misordered); + + use (v_char_func); + use (v_signed_char_func); + use (v_unsigned_char_func); + + use (v_short_func); + use (v_signed_short_func); + use (v_unsigned_short_func); + + use (v_int_func); + use (v_signed_int_func); + use (v_unsigned_int_func); + + use (v_long_func); + use (v_signed_long_func); + use (v_unsigned_long_func); + + use (v_long_long_func); + use (v_signed_long_long_func); + use (v_unsigned_long_long_func); + + use (v_float_func); + use (v_double_func); } |