crash24.C: New test.
authorJakub Jelinek <jakub@redhat.com>
Mon, 6 Nov 2000 12:29:02 +0000 (13:29 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 6 Nov 2000 12:29:02 +0000 (13:29 +0100)
* g++.old-deja/g++.other/crash24.C: New test.
* g++.old-deja/g++.other/crash25.C: New test.
* g++.old-deja/g++.other/crash26.C: New test.
* g++.old-deja/g++.other/crash27.C: New test.
* g++.old-deja/g++.other/crash28.C: New test.
* g++.old-deja/g++.other/crash29.C: New test.
* g++.old-deja/g++.other/crash30.C: New test.
* g++.old-deja/g++.other/crash31.C: New test.
* g++.old-deja/g++.other/crash32.C: New test.
* g++.old-deja/g++.other/crash33.C: New test.
* g++.old-deja/g++.other/crash34.C: New test.
* g++.old-deja/g++.other/crash35.C: New test.

From-SVN: r37275

13 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.other/crash24.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/crash25.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/crash26.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/crash27.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/crash28.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/crash29.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/crash30.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/crash31.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/crash32.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/crash33.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/crash34.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/crash35.C [new file with mode: 0644]

index 46ec3b67a69f6733aa73458b412d0e2332a040ea..9940b989a933448817b9313db2a893e7f81a83ee 100644 (file)
@@ -1,3 +1,18 @@
+2000-11-06  Jakub Jelinek  <jakub@redhat.com>
+
+       * g++.old-deja/g++.other/crash24.C: New test.
+       * g++.old-deja/g++.other/crash25.C: New test.
+       * g++.old-deja/g++.other/crash26.C: New test.
+       * g++.old-deja/g++.other/crash27.C: New test.
+       * g++.old-deja/g++.other/crash28.C: New test.
+       * g++.old-deja/g++.other/crash29.C: New test.
+       * g++.old-deja/g++.other/crash30.C: New test.
+       * g++.old-deja/g++.other/crash31.C: New test.
+       * g++.old-deja/g++.other/crash32.C: New test.
+       * g++.old-deja/g++.other/crash33.C: New test.
+       * g++.old-deja/g++.other/crash34.C: New test.
+       * g++.old-deja/g++.other/crash35.C: New test.
+
 2000-11-06  Jakub Jelinek  <jakub@redhat.com>
 
        * gcc.c-torture/execute/20001031-1.c: New test.
diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash24.C b/gcc/testsuite/g++.old-deja/g++.other/crash24.C
new file mode 100644 (file)
index 0000000..1efbd77
--- /dev/null
@@ -0,0 +1,21 @@
+// Build don't link:
+// Origin: Jakub Jelinek <jakub@redhat.com>
+
+// crash test - XFAIL *-*-*
+
+#include <iostream>
+
+class foo {
+ public:
+   class __iterator;
+   friend class __iterator;
+   typedef __iterator const_iterator;
+   virtual ~foo() { }
+   __iterator begin();                         // ERROR - 
+};
+static void iteratorTest(const foo &x)
+{
+   foo::const_iterator i = x.begin();          // ERROR - 
+   for (; i; ++i)                              // ERROR - 
+      cout << *i;
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash25.C b/gcc/testsuite/g++.old-deja/g++.other/crash25.C
new file mode 100644 (file)
index 0000000..2f471fb
--- /dev/null
@@ -0,0 +1,16 @@
+// Build don't link:
+// Origin: Jakub Jelinek <jakub@redhat.com>
+
+class X {
+public:
+  X();
+  virtual ~X();
+}
+
+X::x()
+{                              // ERROR - 
+}
+
+X::~x()
+{                              // ERROR - 
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash26.C b/gcc/testsuite/g++.old-deja/g++.other/crash26.C
new file mode 100644 (file)
index 0000000..4a363de
--- /dev/null
@@ -0,0 +1,15 @@
+// Build don't link:
+// Origin: Jakub Jelinek <jakub@redhat.com>
+
+// crash test - XFAIL *-*-*
+
+class foo {
+public:
+  foo(int);
+};
+
+void bar(bool x)
+{
+  if(x)
+    foo *a = new foo(foo::not);                // ERROR - 
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash27.C b/gcc/testsuite/g++.old-deja/g++.other/crash27.C
new file mode 100644 (file)
index 0000000..8643b08
--- /dev/null
@@ -0,0 +1,14 @@
+// Build don't link:
+// Origin: Jakub Jelinek <jakub@redhat.com>
+
+// crash test - XFAIL *-*-*
+
+X(Y(long, Type, CLink)); break; default: break; } } }  // ERROR - 
+
+struct A {
+  inline A ();
+};
+
+inline A::A ()
+{ 
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash28.C b/gcc/testsuite/g++.old-deja/g++.other/crash28.C
new file mode 100644 (file)
index 0000000..06a1cfc
--- /dev/null
@@ -0,0 +1,37 @@
+// Build don't link:
+// Origin: Jakub Jelinek <jakub@redhat.com>
+
+// crash test - XFAIL *-*-*
+
+namespace N
+{
+  class X;
+  template <class T>
+  class Y
+  {
+  public:
+    inline Y () {}
+    inline operator const Y<X> & () const
+    {
+      return *reinterpret_cast<const Y<X> *>(this);
+    }
+  };
+}
+class bar
+{
+public:
+  inline bar () {}
+  inline bar (const ::N::Y< ::N::X>& a);
+};
+
+class foo
+{
+  bool b;
+public:
+  foo();
+  void x () throw(bar);
+};
+void foo::x() throw(bar)
+{
+  if (!b) throw bar (static_cast<::N::X*>(this));      // ERROR - parse error
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash29.C b/gcc/testsuite/g++.old-deja/g++.other/crash29.C
new file mode 100644 (file)
index 0000000..a6fc743
--- /dev/null
@@ -0,0 +1,15 @@
+// Build don't link:
+// Origin: Jakub Jelinek <jakub@redhat.com>
+
+// crash test - XFAIL *-*-*
+
+class bar
+{
+public:
+  void foo ();
+  void baz ();
+};
+void bar::foo ()
+{
+  baz x();                     // ERROR - 
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash30.C b/gcc/testsuite/g++.old-deja/g++.other/crash30.C
new file mode 100644 (file)
index 0000000..1058b7f
--- /dev/null
@@ -0,0 +1,19 @@
+// Build don't link:
+// Origin: Jakub Jelinek <jakub@redhat.com>
+
+// crash test - XFAIL *-*-*
+
+struct foo
+{
+  foo();
+  void x();
+};
+
+void foo::x() throw(bar)       // ERROR - parse error
+{
+}
+
+void bar()
+{
+  foo x;
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash31.C b/gcc/testsuite/g++.old-deja/g++.other/crash31.C
new file mode 100644 (file)
index 0000000..32912a0
--- /dev/null
@@ -0,0 +1,11 @@
+// Build don't link:
+// Origin: Jakub Jelinek <jakub@redhat.com>
+
+// crash test - XFAIL *-*-*
+
+namespace bar
+{
+struct foo
+{
+  foo();
+};                     // ERROR - parse error
diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash32.C b/gcc/testsuite/g++.old-deja/g++.other/crash32.C
new file mode 100644 (file)
index 0000000..355ace6
--- /dev/null
@@ -0,0 +1,32 @@
+// Build don't link:
+// Origin: Jakub Jelinek <jakub@redhat.com>
+
+// crash test - XFAIL *-*-*
+
+struct foo
+{
+  enum e
+  {
+    not                                // ERROR - 
+  };
+  ~foo();
+  void x (foo *&a, bool b = (unsigned char)0);
+};
+
+namespace N
+{
+  struct bar;
+
+  template<class T>
+  struct baz
+  {
+    baz(T *p);
+  };
+
+  typedef baz<bar> c;
+}
+
+struct z
+{
+  int a;
+};
diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash33.C b/gcc/testsuite/g++.old-deja/g++.other/crash33.C
new file mode 100644 (file)
index 0000000..757bf51
--- /dev/null
@@ -0,0 +1,13 @@
+// Build don't link:
+// Origin: Jakub Jelinek <jakub@redhat.com>
+
+template <class T>
+inline const T& bar(const T& a, const T& b)
+{
+  return a < b ? b : a;
+}
+
+int foo(void)
+{
+  return bar(sizeof(int), sizeof(long));
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash34.C b/gcc/testsuite/g++.old-deja/g++.other/crash34.C
new file mode 100644 (file)
index 0000000..db81862
--- /dev/null
@@ -0,0 +1,24 @@
+// Build don't link:
+// Origin: Jakub Jelinek <jakub@redhat.com>
+
+// crash test - XFAIL *-*-*
+
+class v
+{
+    double x, y;
+public:
+    v();
+};
+
+class w : public v {
+public :
+    static const w X;
+    w();
+};
+
+void bar(w x);
+
+void foo()
+{
+  bar(w::X);
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash35.C b/gcc/testsuite/g++.old-deja/g++.other/crash35.C
new file mode 100644 (file)
index 0000000..7b78aca
--- /dev/null
@@ -0,0 +1,9 @@
+// Build don't link:
+// Origin: Jakub Jelinek <jakub@redhat.com>
+
+// crash test - XFAIL *-*-*
+
+void foo()
+{
+  if [         // ERROR - parse error
+}