From 6e92b232be51d39eb147f167119a493785a2e98b Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Wed, 6 Sep 2000 09:06:04 +0000 Subject: [PATCH] * g++.old-deja/g++.pt/crash58.C: New test. From-SVN: r36190 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/g++.old-deja/g++.pt/crash58.C | 33 +++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 gcc/testsuite/g++.old-deja/g++.pt/crash58.C 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 + + * g++.old-deja/g++.pt/crash58.C: New test. + 2000-09-06 Greg McGary * 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 + +// bug 147. We ICE'd on an unprocessed LOOKUP_EXPR during tsubsting + +namespace EManip { + template void do_assign(T* d); // ERROR - candidate +}; +template void do_assign(T* d); // ERROR - candidate + +template +struct MatrixC +{ + void foo () { + EManip::do_assign (0); + &EManip::do_assign; + &do_assign; + EManip::do_assign; // WARNING - not a call + do_assign; // WARNING - not a call + } +}; +void foo(MatrixC *ptr) +{ + EManip::do_assign; // WARNING - not a call + &EManip::do_assign; + ptr->foo (); + void (*p1) (int *) = &do_assign; // ERROR - cannot convert + void (*p2) (int *) = &EManip::do_assign; // ERROR - cannot convert + void (*p3) (int *) = &do_assign; + void (*p4) (int *) = &EManip::do_assign; +} -- 2.7.4