diff options
author | Jakub Jelinek <jakub@redhat.com> | 2003-10-27 11:52:48 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2003-10-27 11:52:48 +0100 |
commit | b19ee4bd24bb2ef06911fdf609a156171e2a4e0d (patch) | |
tree | cf433ef961eba9a9d96687e329ae8e19971b3acd /gcc/testsuite/gcc.c-torture | |
parent | 501e79efe738024b9c01a2bbb931226e181e2620 (diff) | |
download | gcc-b19ee4bd24bb2ef06911fdf609a156171e2a4e0d.zip gcc-b19ee4bd24bb2ef06911fdf609a156171e2a4e0d.tar.gz gcc-b19ee4bd24bb2ef06911fdf609a156171e2a4e0d.tar.bz2 |
reload1.c (struct elim_table): Change offset, initial_offset and previous_offset fields to HOST_WIDE_INT.
* reload1.c (struct elim_table): Change offset, initial_offset and
previous_offset fields to HOST_WIDE_INT.
(offsets_at): Change from int to HOST_WIDE_INT.
(reload): Adjust offsets_at initialization.
(eliminate_regs_in_insn): Change type of offset to HOST_WIDE_INT.
(verify_initial_elim_offsets): Change type of t to HOST_WIDE_INT.
* config/i386/i386.c (ix86_compute_frame_layout): Change offset type
to HOST_WIDE_INT. Don't save regs using mov for huge frame sizes
if TARGET_64BIT.
(pro_epilogue_adjust_stack): New function.
(ix86_expand_prologue, ix86_expand_epilogue): Use it.
* config/i386/i386.md (pro_epilogue_adjust_stack): Remove.
(pro_epilogue_adjust_stack_1): Remove * in front of name.
(pro_epilogue_adjust_stack_rex64): Handle -2147483648 properly.
(pro_epilogue_adjust_stack_rex64_2): New insn.
* config/i386/i386.c (ix86_expand_epilogue): Fix comment typo.
* config/i386/i386.c (ix86_expand_call): Replace 40 with
FIRST_REX_INT_REG + 3 /* R11 */.
* gcc.c-torture/compile/20031023-1.c: New test.
* gcc.c-torture/compile/20031023-2.c: New test.
* gcc.c-torture/compile/20031023-3.c: New test.
* gcc.c-torture/compile/20031023-4.c: New test.
Co-Authored-By: Jan Hubicka <jh@suse.cz>
From-SVN: r72975
Diffstat (limited to 'gcc/testsuite/gcc.c-torture')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20031023-1.c | 66 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20031023-2.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20031023-3.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20031023-4.c | 2 |
4 files changed, 72 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/20031023-1.c b/gcc/testsuite/gcc.c-torture/compile/20031023-1.c new file mode 100644 index 0000000..67f8ea9 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20031023-1.c @@ -0,0 +1,66 @@ +#ifndef ASIZE +# define ASIZE 0x10000000000UL +#endif + +#include <limits.h> + +#if LONG_MAX < 8 * ASIZE +# undef ASIZE +# define ASIZE 4096 +#endif + +extern void abort (void); + +int __attribute__((noinline)) +foo (const char *s) +{ + if (!s) + return 1; + if (s[0] != 'a') + abort (); + s += ASIZE - 1; + if (s[0] != 'b') + abort (); + return 0; +} + +int (*fn) (const char *) = foo; + +int __attribute__((noinline)) +bar (void) +{ + char s[ASIZE]; + s[0] = 'a'; + s[ASIZE - 1] = 'b'; + foo (s); + foo (s); + return 0; +} + +int __attribute__((noinline)) +baz (long i) +{ + if (i) + return fn (0); + else + { + char s[ASIZE]; + s[0] = 'a'; + s[ASIZE - 1] = 'b'; + foo (s); + foo (s); + return fn (0); + } +} + +int +main (void) +{ + if (bar ()) + abort (); + if (baz (0) != 1) + abort (); + if (baz (1) != 1) + abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.c-torture/compile/20031023-2.c b/gcc/testsuite/gcc.c-torture/compile/20031023-2.c new file mode 100644 index 0000000..663e447 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20031023-2.c @@ -0,0 +1,2 @@ +#define ASIZE 0x1000000000UL +#include "20031023-1.c" diff --git a/gcc/testsuite/gcc.c-torture/compile/20031023-3.c b/gcc/testsuite/gcc.c-torture/compile/20031023-3.c new file mode 100644 index 0000000..f4a16c7 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20031023-3.c @@ -0,0 +1,2 @@ +#define ASIZE 0x100000000UL +#include "20031023-1.c" diff --git a/gcc/testsuite/gcc.c-torture/compile/20031023-4.c b/gcc/testsuite/gcc.c-torture/compile/20031023-4.c new file mode 100644 index 0000000..5c61f37 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20031023-4.c @@ -0,0 +1,2 @@ +#define ASIZE 0x80000000UL +#include "20031023-1.c" |