gcc/testsuite/g++.old-deja/g++.pt/koenig1.C
raw| 1 | // { dg-do assemble } |
| 2 | // |
| 3 | // Copyright (C) 2000 Free Software Foundation, Inc. |
| 4 | // Contributed by Nathan Sidwell 18 Aug 2000 <[email protected]> |
| 5 | |
| 6 | // bug 123. We ICEd when koenig lookup found a COMPONENT_REF inside a |
| 7 | // TEMPLATE_ID_EXPR. |
| 8 | |
| 9 | void foo(void (*f)()); |
| 10 | |
| 11 | struct A { |
| 12 | template <int s> |
| 13 | static void g(); |
| 14 | template <int s> |
| 15 | void f(); // { dg-message "" } candiate |
| 16 | |
| 17 | static void f_plus () |
| 18 | { |
| 19 | foo (f<0>); // { dg-error "" } no match |
| 20 | foo (g<0>); |
| 21 | } |
| 22 | }; |