diff options
author | Geoffrey Keating <geoffk@apple.com> | 2005-03-04 01:38:56 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2005-03-04 01:38:56 +0000 |
commit | 3159b178b0479e9c8998982c112f486d5d28ab53 (patch) | |
tree | bc2b08b6dd31b1d2589e7be7f732c0193e821ec8 /gcc | |
parent | 57a71826b5d4d7d9a23cb02f8a28e105dd6647fe (diff) | |
download | gcc-3159b178b0479e9c8998982c112f486d5d28ab53.zip gcc-3159b178b0479e9c8998982c112f486d5d28ab53.tar.gz gcc-3159b178b0479e9c8998982c112f486d5d28ab53.tar.bz2 |
pr17133.c: New.
* gcc.c-torture/execute/pr17133.c: New.
* gcc.c-torture/compile/20050303-1.c: New.
From-SVN: r95865
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20050303-1.c | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/pr17133.c | 27 |
3 files changed, 42 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8766cb7..e589f7b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-03-03 Geoffrey Keating <geoffk@apple.com> + + * gcc.c-torture/execute/pr17133.c: New. + * gcc.c-torture/compile/20050303-1.c: New. + 2005-03-04 David Billinghurst <David.Billinghurst@riotinto.com> * gcc.dg/cpp/assert4.c: Fix for cygwin diff --git a/gcc/testsuite/gcc.c-torture/compile/20050303-1.c b/gcc/testsuite/gcc.c-torture/compile/20050303-1.c new file mode 100644 index 0000000..5993a45 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20050303-1.c @@ -0,0 +1,10 @@ +void crc() +{ + int toread; + long long nleft; + unsigned char buf[(128 * 1024)]; + + nleft = 0; + while (toread = (nleft < (2147483647 * 2U + 1U)) ? nleft: (2147483647 * 2U + 1U) ) + ; +} diff --git a/gcc/testsuite/gcc.c-torture/execute/pr17133.c b/gcc/testsuite/gcc.c-torture/execute/pr17133.c new file mode 100644 index 0000000..63352c0 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr17133.c @@ -0,0 +1,27 @@ +extern void abort (void); + +int foo = 0; +void *bar = 0; +unsigned int baz = 100; + +void *pure_alloc () +{ + void *res; + + while (1) + { + res = (void *) ((((unsigned int) (foo + bar))) & ~1); + foo += 2; + if (foo < baz) + return res; + foo = 0; + } +} + +int main () +{ + pure_alloc (); + if (!foo) + abort (); + return 0; +} |