patches/gcc/3.3.3/pr11587-1-test.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Jul 28 21:34:41 2007 +0000 (2007-07-28)
changeset 301 2be7232a73ac
permissions -rw-r--r--
Bump version to 0.2.2.
     1 --- /dev/null	Sat Dec 14 13:56:51 2002
     2 +++ gcc-3.3.1/gcc/testsuite/gcc.dg/pr11587-1.c	Mon Sep 15 08:46:00 2003
     3 @@ -0,0 +1,36 @@
     4 +/* PR optimization/11587
     5 + * Reporter: Michael Eager <eager@mvista.com>
     6 + * Summary: [3.3/3.4 Regression] SH ICE in reload_cse_simplify_operand, postreload.c
     7 + * Keywords: ice-on-valid-code
     8 + *
     9 + * Note: a fix exists; see bugzilla
    10 + *
    11 + * Testcase tweaked by dank@kegel.com
    12 + * Not marked as xfail since it's a regression.
    13 + */
    14 +
    15 +/* { dg-do compile } */
    16 +/* { dg-options "-O1" } */
    17 +int foo1(void);
    18 +int foo2();
    19 +int foo3();
    20 +
    21 +static int goo()
    22 +{
    23 +	int i;
    24 +
    25 +	if (i <= 0)
    26 +		return i;
    27 +
    28 +	if (foo1() > 1) {
    29 +		i = foo2();
    30 +		if (i < 0)
    31 +			return i;
    32 +		if (i) {
    33 +			if (foo3())
    34 +				return 1;
    35 +			return 0;
    36 +		}
    37 +	}
    38 +
    39 +}