patches/gcc/3.3.1/pr11587-1-test.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun May 20 13:48:26 2007 +0000 (2007-05-20)
changeset 112 ea15433daba0
permissions -rw-r--r--
Ah! I finally have a progress bar that doesn't stall the build!
- pipe size in Linux is only 8*512=4096 bytes
- pipe size is not setable
- when the feeding process spits out data faster than the eating
process can read it, then the feeding process stalls after 4KiB
of data sent to the pipe
- for us, the progress bar would spawn a sub-shell every line,
and the sub-shell would in turn spawn a 'date' command.
Which was sloooww as hell, and would cause some kind of a
starvation: the pipe was full most of the time, and the
feeding process was stalled all this time.

Now, we use internal variables and a little hack based onan offset
to determine the elapsed time. Much faster this way, but still
CPU-intensive.
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
+}