summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-06 12:29:02 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-06 12:29:02 +0000
commitba8480002dae05bdcb5158f21ace8ac5fff51c32 (patch)
tree68c1ae0b805fde8f00e107161860cf6f16531515 /gcc
parent1292b41a281b43213408d05c02f87d62504aae72 (diff)
downloadgcc-ba8480002dae05bdcb5158f21ace8ac5fff51c32.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37275 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog15
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/crash24.C21
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/crash25.C16
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/crash26.C15
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/crash27.C14
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/crash28.C37
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/crash29.C15
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/crash30.C19
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/crash31.C11
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/crash32.C32
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/crash33.C13
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/crash34.C24
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/crash35.C9
13 files changed, 241 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 46ec3b67a69..9940b989a93 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,20 @@
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.
2000-11-04 Mark Mitchell <mark@codesourcery.com>
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
index 00000000000..1efbd77691f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/crash24.C
@@ -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
index 00000000000..2f471fb866f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/crash25.C
@@ -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
index 00000000000..4a363de48a1
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/crash26.C
@@ -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
index 00000000000..8643b086e61
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/crash27.C
@@ -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
index 00000000000..06a1cfc3314
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/crash28.C
@@ -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
index 00000000000..a6fc743015a
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/crash29.C
@@ -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
index 00000000000..1058b7fdfd0
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/crash30.C
@@ -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
index 00000000000..32912a0e7cb
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/crash31.C
@@ -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
index 00000000000..355ace6c177
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/crash32.C
@@ -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
index 00000000000..757bf51027d
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/crash33.C
@@ -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
index 00000000000..db818624d8f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/crash34.C
@@ -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
index 00000000000..7b78aca6585
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/crash35.C
@@ -0,0 +1,9 @@
+// Build don't link:
+// Origin: Jakub Jelinek <jakub@redhat.com>
+
+// crash test - XFAIL *-*-*
+
+void foo()
+{
+ if [ // ERROR - parse error
+}