diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-13 09:55:11 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-13 09:55:11 +0000 |
commit | aadbaa4023fe0e7b1ee073f33ca0a6cccd5c2e55 (patch) | |
tree | 19b659552e41d64e2cf5e934a33e7119dada4c08 /gcc/testsuite/gcc.dg/nested-calls-1.c | |
parent | 16de8065baf08ed0e7bec8a7bc488e8d037d912b (diff) | |
download | gcc-aadbaa4023fe0e7b1ee073f33ca0a6cccd5c2e55.tar.gz |
PR middle-end/24003
* calls.c (expand_call): If TARGET is a MEM and some part of the
argument area has been saved, force TARGET to a register.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106860 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/nested-calls-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/nested-calls-1.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/nested-calls-1.c b/gcc/testsuite/gcc.dg/nested-calls-1.c new file mode 100644 index 00000000000..b3f08becac0 --- /dev/null +++ b/gcc/testsuite/gcc.dg/nested-calls-1.c @@ -0,0 +1,42 @@ +/* PR middle-end/24003 */ +/* Contributed by Eric Botcazou <ebotcazou@adacore.com> */ + +/* { dg-do run } */ +/* { dg-options "-std=c99 -O -fno-inline" } */ +/* { dg-options "-std=c99 -O -fno-inline -mtune=i686" { target { i?86-*-* && ilp32 } } } */ + +#include <limits.h> + +typedef unsigned long uns32_t; +typedef unsigned long long uns64_t; + +extern void abort(void); + +uns32_t lo (uns64_t p) +{ + return (uns32_t)p; +} + +uns64_t concat (uns32_t p1, uns32_t p2) +{ +#if LLONG_MAX > 2147483647L + return ((uns64_t)p1 << 32) | p2; +#else + return 0; +#endif +} + +uns64_t lshift32 (uns64_t p1, uns32_t p2) +{ + return concat (lo (p1), p2); +} + +int main(void) +{ +#if LLONG_MAX > 2147483647L + if (lshift32 (0xFFFFFFFF12345678ULL, 0x90ABCDEFUL) != 0x1234567890ABCDEFULL) + abort (); +#endif + + return 0; +} |