X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=gcc%2Ftestsuite%2Fgcc.dg%2Fi386-loop-1.c;fp=gcc%2Ftestsuite%2Fgcc.dg%2Fi386-loop-1.c;h=0000000000000000000000000000000000000000;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=e8bdaf5bcd34df261a4bbd2e804c96746442bce0;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/gcc/testsuite/gcc.dg/i386-loop-1.c b/gcc/testsuite/gcc.dg/i386-loop-1.c deleted file mode 100644 index e8bdaf5b..00000000 --- a/gcc/testsuite/gcc.dg/i386-loop-1.c +++ /dev/null @@ -1,105 +0,0 @@ -/* PR optimization/9888 */ -/* { dg-do run { target i?86-*-* } } */ -/* { dg-options "-mcpu=k6 -O3" } */ - -/* Verify that GCC doesn't emit out of range 'loop' instructions. */ - -extern void abort (void); -extern void exit (int); - - -f1 (a) - long a; -{ - int i; - for (i = 0; i < 10; i++) - { - if (--a == -1) - return i; - } - return -1; -} - -f2 (a) - long a; -{ - int i; - for (i = 0; i < 10; i++) - { - if (--a != -1) - return i; - } - return -1; -} - -f3 (a) - long a; -{ - int i; - for (i = 0; i < 10; i++) - { - if (--a == 0) - return i; - } - return -1; -} - -f4 (a) - long a; -{ - int i; - for (i = 0; i < 10; i++) - { - if (--a != 0) - return i; - } - return -1; -} - -f5 (a) - long a; -{ - int i; - for (i = 0; i < 10; i++) - { - if (++a == 0) - return i; - } - return -1; -} - -f6 (a) - long a; -{ - int i; - for (i = 0; i < 10; i++) - { - if (++a != 0) - return i; - } - return -1; -} - - -int main() -{ - if (f1 (5L) != 5) - abort (); - if (f2 (1L) != 0) - abort (); - if (f2 (0L) != 1) - abort (); - if (f3 (5L) != 4) - abort (); - if (f4 (1L) != 1) - abort (); - if (f4 (0L) != 0) - abort (); - if (f5 (-5L) != 4) - abort (); - if (f6 (-1L) != 1) - abort (); - if (f6 (0L) != 0) - abort (); - exit (0); -}