aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2000-09-06 09:06:04 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2000-09-06 09:06:04 +0000
commit6e92b232be51d39eb147f167119a493785a2e98b (patch)
tree49e8c093a6e6aba229a6e7d6bf3eece763af4be4 /gcc
parentc833d2be02e2e98ef83c204734389795e8dd2abd (diff)
downloadgcc-6e92b232be51d39eb147f167119a493785a2e98b.zip
gcc-6e92b232be51d39eb147f167119a493785a2e98b.tar.gz
gcc-6e92b232be51d39eb147f167119a493785a2e98b.tar.bz2
* g++.old-deja/g++.pt/crash58.C: New test.
From-SVN: r36190
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/crash58.C33
2 files changed, 37 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 53778d8..a80da39 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
+
+ * g++.old-deja/g++.pt/crash58.C: New test.
+
2000-09-06 Greg McGary <greg@mcgary.org>
* gcc.c-torture/20000906.c: New test.
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash58.C b/gcc/testsuite/g++.old-deja/g++.pt/crash58.C
new file mode 100644
index 0000000..6a2f109
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/crash58.C
@@ -0,0 +1,33 @@
+// Build don't link:
+//
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 5 Sept 2000 <nathan@codesourcery.com>
+
+// bug 147. We ICE'd on an unprocessed LOOKUP_EXPR during tsubsting
+
+namespace EManip {
+ template <class T> void do_assign(T* d); // ERROR - candidate
+};
+template <class T> void do_assign(T* d); // ERROR - candidate
+
+template <class T>
+struct MatrixC
+{
+ void foo () {
+ EManip::do_assign<T> (0);
+ &EManip::do_assign<T>;
+ &do_assign<T>;
+ EManip::do_assign<T>; // WARNING - not a call
+ do_assign<T>; // WARNING - not a call
+ }
+};
+void foo(MatrixC <double> *ptr)
+{
+ EManip::do_assign<double>; // WARNING - not a call
+ &EManip::do_assign<double>;
+ ptr->foo ();
+ void (*p1) (int *) = &do_assign<double>; // ERROR - cannot convert
+ void (*p2) (int *) = &EManip::do_assign<double>; // ERROR - cannot convert
+ void (*p3) (int *) = &do_assign;
+ void (*p4) (int *) = &EManip::do_assign;
+}