summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/crash57.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/crash57.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/crash57.C12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash57.C b/gcc/testsuite/g++.old-deja/g++.pt/crash57.C
new file mode 100644
index 000000000..eb6d61595
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/crash57.C
@@ -0,0 +1,12 @@
+// { dg-do assemble }
+//
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 11 Aug 2000 <nathan@codesourcery.com>
+
+// bug 382. We ICE'd rather than decay to an address.
+
+struct A {
+template <class T> static void f(T) {}
+};
+void (*h)(int) = A::f<int>;
+void (*i)(int) = &A::f<int>;