diff options
author | David Carlton <carlton@bactrian.org> | 2002-12-06 19:21:51 +0000 |
---|---|---|
committer | David Carlton <carlton@bactrian.org> | 2002-12-06 19:21:51 +0000 |
commit | de46ecd713c0b4dbf5ef7a26b293aa6b11cf3635 (patch) | |
tree | 2a4959eaf5770891713a6ad8ed6d7bb95e0966b1 /gdb/testsuite | |
parent | 2b298b5d975e391be341eeccde3828936690d5f8 (diff) | |
download | gdb-de46ecd713c0b4dbf5ef7a26b293aa6b11cf3635.zip gdb-de46ecd713c0b4dbf5ef7a26b293aa6b11cf3635.tar.gz gdb-de46ecd713c0b4dbf5ef7a26b293aa6b11cf3635.tar.bz2 |
2002-12-06 David Carlton <carlton@math.stanford.edu>
* gdb.base/store.c: Don't declare functions static.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/store.c | 53 |
2 files changed, 33 insertions, 24 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index e915ae5..24c947f 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2002-12-06 David Carlton <carlton@math.stanford.edu> + + * gdb.base/store.c: Don't declare functions static. + 2002-12-04 Andrew Cagney <ac131313@redhat.com> * gdb.base/store.exp, gdb.base/store.c: New files. diff --git a/gdb/testsuite/gdb.base/store.c b/gdb/testsuite/gdb.base/store.c index 3a69641..802945f 100644 --- a/gdb/testsuite/gdb.base/store.c +++ b/gdb/testsuite/gdb.base/store.c @@ -2,37 +2,42 @@ in the target. This pretty much relies on the compiler taking heed of requests for values to be stored in registers. */ -static char +/* NOTE: carlton/2002-12-05: These functions were all static, but for + whatever reason that caused GCC 3.1 to optimize away some of the + function calls within main even when no optimization flags were + passed. */ + +char add_char (register char u, register char v) { return u + v; } -static short +short add_short (register short u, register short v) { return u + v; } -static int +int add_int (register int u, register int v) { return u + v; } -static long +long add_long (register long u, register long v) { return u + v; } -static float +float add_float (register float u, register float v) { return u + v; } -static double +double add_double (register double u, register double v) { return u + v; @@ -40,7 +45,7 @@ add_double (register double u, register double v) /* */ -static char +char wack_char (register char u, register char v) { register char l = u; @@ -48,7 +53,7 @@ wack_char (register char u, register char v) return l; } -static short +short wack_short (register short u, register short v) { register short l = u; @@ -56,7 +61,7 @@ wack_short (register short u, register short v) return l; } -static int +int wack_int (register int u, register int v) { register int l = u; @@ -64,7 +69,7 @@ wack_int (register int u, register int v) return l; } -static long +long wack_long (register long u, register long v) { register long l = u; @@ -72,7 +77,7 @@ wack_long (register long u, register long v) return l; } -static float +float wack_float (register float u, register float v) { register float l = u; @@ -80,7 +85,7 @@ wack_float (register float u, register float v) return l; } -static double +double wack_double (register double u, register double v) { register double l = u; @@ -93,7 +98,7 @@ struct s_2 { short s[2]; } z_2, s_2; struct s_3 { short s[3]; } z_3, s_3; struct s_4 { short s[4]; } z_4, s_4; -static struct s_1 +struct s_1 add_struct_1 (struct s_1 s) { int i; @@ -104,7 +109,7 @@ add_struct_1 (struct s_1 s) return s; } -static struct s_2 +struct s_2 add_struct_2 (struct s_2 s) { int i; @@ -115,7 +120,7 @@ add_struct_2 (struct s_2 s) return s; } -static struct s_3 +struct s_3 add_struct_3 (struct s_3 s) { int i; @@ -126,7 +131,7 @@ add_struct_3 (struct s_3 s) return s; } -static struct s_4 +struct s_4 add_struct_4 (struct s_4 s) { int i; @@ -137,7 +142,7 @@ add_struct_4 (struct s_4 s) return s; } -static struct s_1 +struct s_1 wack_struct_1 (void) { int i; register struct s_1 u = z_1; @@ -146,7 +151,7 @@ wack_struct_1 (void) return u; } -static struct s_2 +struct s_2 wack_struct_2 (void) { int i; register struct s_2 u = z_2; @@ -155,7 +160,7 @@ wack_struct_2 (void) return u; } -static struct s_3 +struct s_3 wack_struct_3 (void) { int i; register struct s_3 u = z_3; @@ -164,7 +169,7 @@ wack_struct_3 (void) return u; } -static struct s_4 +struct s_4 wack_struct_4 (void) { int i; register struct s_4 u = z_4; @@ -180,28 +185,28 @@ struct f_2 {unsigned i:2;unsigned j:2;unsigned k:2; } f_2 = {1,1,1}, F_2; struct f_3 {unsigned i:3;unsigned j:3;unsigned k:3; } f_3 = {1,1,1}, F_3; struct f_4 {unsigned i:4;unsigned j:4;unsigned k:4; } f_4 = {1,1,1}, F_4; -static struct f_1 +struct f_1 wack_field_1 (void) { register struct f_1 u = f_1; return u; } -static struct f_2 +struct f_2 wack_field_2 (void) { register struct f_2 u = f_2; return u; } -static struct f_3 +struct f_3 wack_field_3 (void) { register struct f_3 u = f_3; return u; } -static struct f_4 +struct f_4 wack_field_4 (void) { register struct f_4 u = f_4; |