]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
This commit was manufactured by cvs2svn to create branch
authorNo Author <no-author@gcc.gnu.org>
Wed, 8 Jun 2005 11:26:05 +0000 (11:26 +0000)
committerNo Author <no-author@gcc.gnu.org>
Wed, 8 Jun 2005 11:26:05 +0000 (11:26 +0000)
'gcc-3_4-branch'.

From-SVN: r100755

gcc/testsuite/g++.dg/ext/label4.C [new file with mode: 0644]
gcc/testsuite/g++.dg/parse/defarg9.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/init-excess-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tls/debug-1.c [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/ext/label4.C b/gcc/testsuite/g++.dg/ext/label4.C
new file mode 100644 (file)
index 0000000..80b50a7
--- /dev/null
@@ -0,0 +1,6 @@
+// PR c++/20563: ICE (--enable-checking), infinite loop (--disable-checking)
+// Origin:       Giovanni Bajo <giovannibajo@libero.it>
+
+// { dg-do compile }
+
+__label__ *l;  // { dg-error "before" }
diff --git a/gcc/testsuite/g++.dg/parse/defarg9.C b/gcc/testsuite/g++.dg/parse/defarg9.C
new file mode 100644 (file)
index 0000000..8496cfb
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright (C) 2005 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 6 Jun 2005 <nathan@codesourcery.com>
+
+// PR 21903:Reject legal with default arg confusion
+// Origin:  Wolfgang Bangerth <bangerth@dealii.org>
+
+
+struct O { 
+  template<typename T> struct B { 
+    void set (T, bool=true); 
+  }; 
+  
+  struct D : public B<int> {}; 
+}; 
+
+void x () 
+{ 
+  O::D d; 
+  d.set(1); 
+}
diff --git a/gcc/testsuite/gcc.dg/init-excess-1.c b/gcc/testsuite/gcc.dg/init-excess-1.c
new file mode 100644 (file)
index 0000000..ade6fd0
--- /dev/null
@@ -0,0 +1,48 @@
+/* Test for various cases of excess initializers for empty objects:
+   bug 21873.  Various versions of GCC ICE, hang or loop repeating
+   diagnostics on various of these tests.  */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+struct s0 { };
+struct s1 { int a; };
+struct s2 { int a; int b; };
+
+int a0[0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+int a1[0][0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+int a2[0][1] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+int a3[1][0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+int a4[][0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+int a5[][0][0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+int a6[][0][1] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+int a7[][1][0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+
+struct s0 b0[0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+struct s0 b1[0][0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+struct s0 b2[0][1] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+struct s0 b3[1][0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+struct s0 b4[][0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+struct s0 b5[][0][0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+struct s0 b6[][0][1] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+struct s0 b7[][1][0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+struct s0 b8[1] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+struct s0 b9[] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+
+struct s1 c0[0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+struct s1 c1[0][0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+struct s1 c2[0][1] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+struct s1 c3[1][0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+struct s1 c4[][0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+struct s1 c5[][0][0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+struct s1 c6[][0][1] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+struct s1 c7[][1][0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+
+struct s2 d0[0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+struct s2 d1[0][0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+struct s2 d2[0][1] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+struct s2 d3[1][0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+struct s2 d4[][0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+struct s2 d5[][0][0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+struct s2 d6[][0][1] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
+struct s2 d7[][1][0] = { 1, 2 }; /* { dg-warning "excess elements|near init" } */
diff --git a/gcc/testsuite/gcc.dg/tls/debug-1.c b/gcc/testsuite/gcc.dg/tls/debug-1.c
new file mode 100644 (file)
index 0000000..719f064
--- /dev/null
@@ -0,0 +1,4 @@
+/* { dg-do assemble } */
+/* { dg-options "-g" } */
+
+__thread int i;