aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20020225-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20020225-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20020225-1.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20020225-1.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20020225-1.c
new file mode 100644
index 000000000..514730a09
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20020225-1.c
@@ -0,0 +1,17 @@
+/* This testcase failed at -O2 on powerpc64 due to andsi3 writing
+ nonzero 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);
+}