]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
This commit was manufactured by cvs2svn to create branch
authorNo Author <no-author@gcc.gnu.org>
Tue, 18 Jan 2005 08:39:29 +0000 (08:39 +0000)
committerNo Author <no-author@gcc.gnu.org>
Tue, 18 Jan 2005 08:39:29 +0000 (08:39 +0000)
'gcc-3_3-branch'.

From-SVN: r93821

gcc/testsuite/gcc.dg/short-compare-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/short-compare-2.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.dg/short-compare-1.c b/gcc/testsuite/gcc.dg/short-compare-1.c
new file mode 100644 (file)
index 0000000..6a4e388
--- /dev/null
@@ -0,0 +1,21 @@
+/* PR rtl-optimization/19296 */
+/* Origin: Falk Hueffner <falk@debian.org> */
+
+/* { dg-do run } */
+/* { dg-options "-O" } */
+/* { dg-options "-O -mtune=i686" { target i?86-*-* } } */
+/* { dg-options "-O -m32 -mtune=i686" { target x86_64-*-* } } */
+
+extern void abort(void);
+
+void f(unsigned short ad)
+{
+  if (ad >= 0x4000 && ad < 0xc000) 
+    abort();
+}
+
+int main(void)
+{
+  f(0xff00); 
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/short-compare-2.c b/gcc/testsuite/gcc.dg/short-compare-2.c
new file mode 100644 (file)
index 0000000..1c5963c
--- /dev/null
@@ -0,0 +1,22 @@
+/* PR rtl-optimization/19296 */
+/* Origin: Falk Hueffner <falk@debian.org> */
+/* Testcase by Andrew Pinski <pinskia@gcc.gnu.org> */
+
+/* { dg-do run } */
+/* { dg-options "-O" } */
+/* { dg-options "-O -mtune=i686" { target i?86-*-* } } */
+/* { dg-options "-O -m32 -mtune=i686" { target x86_64-*-* } } */
+
+extern void abort();
+
+void f(unsigned short ad)
+{
+  if ((short) (ad - 0x4000) >= 0)
+    abort();
+}
+
+int main(void)
+{
+  f(0xc000);
+  return 0;
+}