* gcc.dg/20020926-1.c: New test.
authorUlrich Weigand <uweigand@de.ibm.com>
Thu, 26 Sep 2002 18:26:08 +0000 (18:26 +0000)
committerUlrich Weigand <uweigand@gcc.gnu.org>
Thu, 26 Sep 2002 18:26:08 +0000 (18:26 +0000)
From-SVN: r57544

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/20020926-1.c [new file with mode: 0644]

index 8d5d331e8f7ab0f30870766fd386cf6386b58209..c581c0f0b03b30b0e48cd09aafc019e359b226cf 100644 (file)
@@ -1,3 +1,7 @@
+2002-09-26  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * gcc.dg/20020926-1.c: New test.
+
 2002-09-25  David S. Miller  <davem@redhat.com>
 
        PR target/7842
diff --git a/gcc/testsuite/gcc.dg/20020926-1.c b/gcc/testsuite/gcc.dg/20020926-1.c
new file mode 100644 (file)
index 0000000..d2d6574
--- /dev/null
@@ -0,0 +1,14 @@
+/* Make sure that LEGITIMIZE_ADDRESS is called to handle
+   negative displacements.  */
+
+/* { dg-do compile { target s390-*-* } } */
+/* { dg-options "-O2" } */
+
+int test (int *addr)
+{
+  return *(addr - 1);
+}
+
+/* { dg-final { scan-assembler "-4096" } } */
+/* { dg-final { scan-assembler-not "ahi" } } */
+