From: No Author Date: Thu, 27 Jan 2005 02:02:06 +0000 (+0000) Subject: This commit was manufactured by cvs2svn to create branch X-Git-Tag: releases/gcc-3.4.4~268 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ffde26f7607859ccc6ecb3f7c81655d285193a9;p=thirdparty%2Fgcc.git This commit was manufactured by cvs2svn to create branch 'gcc-3_4-branch'. From-SVN: r94304 --- diff --git a/gcc/testsuite/gcc.c-torture/execute/20050124-1.c b/gcc/testsuite/gcc.c-torture/execute/20050124-1.c new file mode 100644 index 000000000000..9d039ef66234 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20050124-1.c @@ -0,0 +1,41 @@ +/* PR rtl-optimization/19579 */ + +extern void abort (void); + +int +foo (int i, int j) +{ + int k = i + 1; + + if (j) + { + if (k > 0) + k++; + else if (k < 0) + k--; + } + + return k; +} + +int +main (void) +{ + if (foo (-2, 0) != -1) + abort (); + if (foo (-1, 0) != 0) + abort (); + if (foo (0, 0) != 1) + abort (); + if (foo (1, 0) != 2) + abort (); + if (foo (-2, 1) != -2) + abort (); + if (foo (-1, 1) != 0) + abort (); + if (foo (0, 1) != 2) + abort (); + if (foo (1, 1) != 3) + abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/20041216-1.c b/gcc/testsuite/gcc.dg/20041216-1.c new file mode 100644 index 000000000000..3f892a2e375c --- /dev/null +++ b/gcc/testsuite/gcc.dg/20041216-1.c @@ -0,0 +1,23 @@ +/* This test case would get an unresolved symbol during link + because stabs referred to an optimized-away literal pool + entry. */ + +/* { dg-do run { target s390*-*-* } } */ +/* { dg-options "-O2 -fno-omit-frame-pointer -gstabs" } */ + +int main (void) +{ + static char buf[4096]; + char *p; + + do + { + p = buf; + asm volatile ("" : : : "memory", "0", "1", "2", "3", "4", "5", "6", + "7", "8", "9", "10", "12"); + } + while (*p); + + return 0; +} +