From: No Author Date: Tue, 18 Jan 2005 08:39:29 +0000 (+0000) Subject: This commit was manufactured by cvs2svn to create branch X-Git-Tag: releases/gcc-3.3.6~129 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8dccef75ba4c1e565704e2de5fec33f4f43e767a;p=thirdparty%2Fgcc.git This commit was manufactured by cvs2svn to create branch 'gcc-3_3-branch'. From-SVN: r93821 --- diff --git a/gcc/testsuite/gcc.dg/short-compare-1.c b/gcc/testsuite/gcc.dg/short-compare-1.c new file mode 100644 index 000000000000..6a4e388d1796 --- /dev/null +++ b/gcc/testsuite/gcc.dg/short-compare-1.c @@ -0,0 +1,21 @@ +/* PR rtl-optimization/19296 */ +/* Origin: Falk Hueffner */ + +/* { 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 index 000000000000..1c5963c5a2f2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/short-compare-2.c @@ -0,0 +1,22 @@ +/* PR rtl-optimization/19296 */ +/* Origin: Falk Hueffner */ +/* Testcase by Andrew Pinski */ + +/* { 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; +}