]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
This commit was manufactured by cvs2svn to create branch
authorNo Author <no-author@gcc.gnu.org>
Sat, 27 Nov 2004 16:51:39 +0000 (16:51 +0000)
committerNo Author <no-author@gcc.gnu.org>
Sat, 27 Nov 2004 16:51:39 +0000 (16:51 +0000)
'gcc-3_4-branch'.

From-SVN: r91379

gcc/testsuite/g++.dg/expr/return1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/crash28.C [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/20041119-1.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/20041126-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/loop-6.c [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/expr/return1.C b/gcc/testsuite/g++.dg/expr/return1.C
new file mode 100644 (file)
index 0000000..7a64988
--- /dev/null
@@ -0,0 +1,9 @@
+// PR c++/18545
+
+struct A;
+
+A foo()  // { dg-error "" }
+{
+  A a; // { dg-error "" }
+  return a;
+}
diff --git a/gcc/testsuite/g++.dg/template/crash28.C b/gcc/testsuite/g++.dg/template/crash28.C
new file mode 100644 (file)
index 0000000..e8b2bbb
--- /dev/null
@@ -0,0 +1,13 @@
+// PR c++/18445
+
+struct a
+{
+  int what();
+};
+void g(void*);
+template<class T>
+void f()
+{
+  a ex;
+  g(ex.what); // { dg-error "" }
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/20041119-1.c b/gcc/testsuite/gcc.c-torture/compile/20041119-1.c
new file mode 100644 (file)
index 0000000..3e0e565
--- /dev/null
@@ -0,0 +1,30 @@
+/* PR rtl-optimization/17825 */
+#ifdef __i386__
+register unsigned int reg __asm ("esi");
+#elif defined __x86_64__
+register unsigned int reg __asm ("r14");
+#else
+unsigned int reg;
+#endif
+
+struct S
+{
+  unsigned int h[8];
+} *b;
+unsigned int c;
+void foo (int);
+
+void
+bar (void)
+{
+  unsigned int j, k, l, m;
+
+  j = (reg & 0xffff) | ((b->h[2] & 0xffff) << 16);
+  k = c & 0xffff;
+  if (k == 0)
+    foo (0);
+  l = (j / k) & 0xffff;
+  m = (j % k) & 0xffff;
+  reg = (reg & 0xffff0000) | l;
+  b->h[2] = (b->h[2] & 0xffff0000) | m;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/20041126-1.c b/gcc/testsuite/gcc.c-torture/execute/20041126-1.c
new file mode 100644 (file)
index 0000000..58855ae
--- /dev/null
@@ -0,0 +1,26 @@
+extern int abs (int);
+extern void abort (void);
+
+void
+check (int *p)
+{
+  int i;
+  for (i = 0; i < 5; ++i)
+    if (p[i])
+      abort ();
+  for (; i < 10; ++i)
+    if (p[i] != i + 1)
+      abort ();
+}
+
+int
+main (void)
+{
+  int a[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
+  int i;
+
+  for (i = -5; i < 0; i++)
+    a[abs (i - 10) - 11] = 0;
+  check (a);
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/loop-6.c b/gcc/testsuite/gcc.dg/loop-6.c
new file mode 100644 (file)
index 0000000..653854e
--- /dev/null
@@ -0,0 +1,25 @@
+/* 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;
+}