]> 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, 21 Jan 2004 02:40:59 +0000 (02:40 +0000)
committerNo Author <no-author@gcc.gnu.org>
Wed, 21 Jan 2004 02:40:59 +0000 (02:40 +0000)
'gcc-3_3-branch'.

From-SVN: r76251

gcc/testsuite/g++.dg/ext/array1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/init/ref10.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/instantiate6.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/20040112-1.c [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/ext/array1.C b/gcc/testsuite/g++.dg/ext/array1.C
new file mode 100644 (file)
index 0000000..7e54dc9
--- /dev/null
@@ -0,0 +1,14 @@
+// PR c++/13574
+// { dg-options "" }
+
+class A { 
+public: 
+  A() : argc(0), argv() { }; 
+private: 
+  int argc; 
+  char* argv[]; 
+}; 
+int main() { 
+  A y; 
+} 
diff --git a/gcc/testsuite/g++.dg/init/ref10.C b/gcc/testsuite/g++.dg/init/ref10.C
new file mode 100644 (file)
index 0000000..73fd6de
--- /dev/null
@@ -0,0 +1,14 @@
+// PR c++/13478
+
+struct A {};
+struct B : protected A {
+    B() {};
+    B(const A& ) {};
+private:
+    B(const B& ) {};
+};
+
+void foo(const A* ap)
+{
+  const B& br = *ap;
+}
diff --git a/gcc/testsuite/g++.dg/template/instantiate6.C b/gcc/testsuite/g++.dg/template/instantiate6.C
new file mode 100644 (file)
index 0000000..d5d712e
--- /dev/null
@@ -0,0 +1,16 @@
+// { dg-do compile }
+
+// Origin: gianni@mariani.ws
+//       Wolfgang Bangerth <bangerth@ticam.utexas.edu>
+
+// PR c++/13289: ICE recursively instantiate static member data.
+
+template <int N> struct S { 
+    static const int C; 
+}; 
+template <int N> 
+const int S<N>::C = S<(N+1)%2>::C;
+template struct S<1>;
+
diff --git a/gcc/testsuite/gcc.dg/20040112-1.c b/gcc/testsuite/gcc.dg/20040112-1.c
new file mode 100644 (file)
index 0000000..83996fe
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler "testb" } } */
+ftn (char *sp)
+{
+  char status;
+
+  while (1)
+    {
+      *sp = 0xE8;
+      status = *(volatile char *) sp;
+      if (status & 0x80)
+       break;
+    }
+}