patches/gcc/3.3.3/pr11587-1-test.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1 eeea35fbf182
permissions -rw-r--r--
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
yann@1
     1
--- /dev/null	Sat Dec 14 13:56:51 2002
yann@1
     2
+++ gcc-3.3.1/gcc/testsuite/gcc.dg/pr11587-1.c	Mon Sep 15 08:46:00 2003
yann@1
     3
@@ -0,0 +1,36 @@
yann@1
     4
+/* PR optimization/11587
yann@1
     5
+ * Reporter: Michael Eager <eager@mvista.com>
yann@1
     6
+ * Summary: [3.3/3.4 Regression] SH ICE in reload_cse_simplify_operand, postreload.c
yann@1
     7
+ * Keywords: ice-on-valid-code
yann@1
     8
+ *
yann@1
     9
+ * Note: a fix exists; see bugzilla
yann@1
    10
+ *
yann@1
    11
+ * Testcase tweaked by dank@kegel.com
yann@1
    12
+ * Not marked as xfail since it's a regression.
yann@1
    13
+ */
yann@1
    14
+
yann@1
    15
+/* { dg-do compile } */
yann@1
    16
+/* { dg-options "-O1" } */
yann@1
    17
+int foo1(void);
yann@1
    18
+int foo2();
yann@1
    19
+int foo3();
yann@1
    20
+
yann@1
    21
+static int goo()
yann@1
    22
+{
yann@1
    23
+	int i;
yann@1
    24
+
yann@1
    25
+	if (i <= 0)
yann@1
    26
+		return i;
yann@1
    27
+
yann@1
    28
+	if (foo1() > 1) {
yann@1
    29
+		i = foo2();
yann@1
    30
+		if (i < 0)
yann@1
    31
+			return i;
yann@1
    32
+		if (i) {
yann@1
    33
+			if (foo3())
yann@1
    34
+				return 1;
yann@1
    35
+			return 0;
yann@1
    36
+		}
yann@1
    37
+	}
yann@1
    38
+
yann@1
    39
+}