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

From-SVN: r80300

gcc/testsuite/g++.dg/init/goto1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/defarg4.C [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/20040331-1.c [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/init/goto1.C b/gcc/testsuite/g++.dg/init/goto1.C
new file mode 100644 (file)
index 0000000..b0a0c52
--- /dev/null
@@ -0,0 +1,23 @@
+// PR c++/14724
+// { dg-do run }
+
+int j;
+
+template <class T>
+struct C {
+  C() { ++j; }
+  ~C() { --j; }
+};
+
+int main(int, char **) {
+  {
+    int i = 0;
+ again:
+    C<int> v;
+    if (++i < 10)
+      goto again;
+  }
+
+  return j;
+}
+
diff --git a/gcc/testsuite/g++.dg/template/defarg4.C b/gcc/testsuite/g++.dg/template/defarg4.C
new file mode 100644 (file)
index 0000000..293538a
--- /dev/null
@@ -0,0 +1,14 @@
+// PR c++/14763
+
+struct A { 
+  int get() const {} 
+  static A *foo(); 
+}; 
+template<bool> struct S { 
+  S(unsigned int = A::foo()->get())  ; 
+}; 
+void foo() throw() { 
+  S<false> f; 
+} 
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040331-1.c b/gcc/testsuite/gcc.c-torture/execute/20040331-1.c
new file mode 100644 (file)
index 0000000..67b3e3a
--- /dev/null
@@ -0,0 +1,12 @@
+/* PR c++/14755 */
+extern void abort (void);
+extern void exit (int);
+
+int
+main (void)
+{
+  struct { int count: 31; } s = { 0 };
+  while (s.count--)
+    abort ();
+  exit (0);
+}