'gcc-3_3-branch'.
From-SVN: r91382
--- /dev/null
+// { dg-do compile }
+// { dg-options "-O2 -Winline" }
+// Origin: <markus at oberhumer dot com>
+// PR 17115: We should not emit -Winline warning for functions marked with
+// noinline
+
+struct Foo {
+ __attribute__((noinline)) int a(int r) { return r & 1; }
+ virtual __attribute__((noinline)) int b(int r) { return r & 1; }
+ static __attribute__((noinline)) int c(int r) { return r & 1; }
+};
+
+int bar(int r) {
+ Foo f;
+ int k = 1; k &= f.a(r); k &= f.b(r); k &= f.a(r);
+ return k;
+}
--- /dev/null
+/* PR optimization/8555 */
+/* { dg-do compile } */
+/* { dg-options "-O -ffast-math -funroll-loops" } */
+/* { dg-options "-march=pentium3 -O -ffast-math -funroll-loops" { target i?86-*-* } } */
+/* { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } } */
+
+float foo (float *a, int i)
+{
+ int j;
+ float x = a[j = i - 1], y;
+
+ for (j = i; --j >= 0; )
+ if ((y = a[j]) > x)
+ x = y;
+
+ return x;
+}
--- /dev/null
+/* PR optimization/18577 */
+/* Origin: Falk Hueffner <falk@debian.org> */
+
+/* { dg-do run } */
+/* { dg-options "-O2 -funroll-all-loops" } */
+
+static float tfcos12[3];
+__attribute__((noinline)) double f(double x) { return x; }
+int g;
+
+int main(void)
+{
+ int i, j;
+ for (i = 0; i < 1; i++)
+ tfcos12[i] = 0.5;
+
+ for (i = 0; i < 1; i++)
+ {
+ tfcos12[i] = 0.5 * f(i);
+ for (j = 0; j < 12; j++)
+ g++;
+ }
+
+ return 0;
+}
--- /dev/null
+/* PR rtl-optimization/9771 */
+/* { dg-do run { target i?86-*-* } } */
+/* { dg-options "-O2 -fomit-frame-pointer -ffixed-ebp" } */
+
+extern void abort(void);
+extern void exit(int);
+
+register long *B asm ("ebp");
+
+long x = 10;
+long y = 20;
+
+void bar(void)
+{
+ B = &y;
+}
+
+void foo()
+{
+ long *adr = B;
+ long save = *adr;
+
+ *adr = 123;
+
+ bar();
+
+ *adr = save;
+}
+
+int main()
+{
+ B = &x;
+
+ foo();
+
+ if (x != 10 || y != 20)
+ abort();
+
+ /* We can't return, as our caller may assume %ebp is preserved! */
+ /* We could save/restore it (like foo), but its easier to exit. */
+ exit(0);
+}
+