From 11a35b8bb1c3c5d17f1864f068acb861bbd0eb84 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Sun, 24 Feb 2002 23:17:23 +0000 Subject: [PATCH] New test. From-SVN: r50012 --- gcc/testsuite/ChangeLog | 4 ++++ .../gcc.c-torture/execute/20020225-1.c | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/execute/20020225-1.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 61dedb65bf70..8d445c87f258 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2002-02-25 Alan Modra + + * gcc.c-torture/execute/20020225-1.c: New. + 2002-02-24 Neil Booth * testsuite/gcc.dg/cpp/wchar-1.c: New test. diff --git a/gcc/testsuite/gcc.c-torture/execute/20020225-1.c b/gcc/testsuite/gcc.c-torture/execute/20020225-1.c new file mode 100644 index 000000000000..61724a1f006e --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20020225-1.c @@ -0,0 +1,17 @@ +/* This testcase failed at -O2 on powerpc64 due to andsi3 writing + non-zero bits to the high 32 bits of a 64 bit register. */ + +extern void abort (void); +extern void exit (int); + +unsigned long foo (unsigned long base, unsigned int val) +{ + return base + (val & 0x80000001); +} + +int main (void) +{ + if (foo (0L, 0x0ffffff0) != 0L) + abort (); + exit (0); +}