gcc/testsuite/g++.old-deja/g++.ext/attrib3.C
raw| 1 | // { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } |
| 2 | // Test for proper handling of attributes in template instantiation. |
| 3 | // Contributed by Jason Merrill <[email protected]> |
| 4 | |
| 5 | template <class T> |
| 6 | struct A { |
| 7 | static void f () __attribute__ ((stdcall)); |
| 8 | }; |
| 9 | |
| 10 | template <class T> void |
| 11 | A<T>::f () { } |
| 12 | |
| 13 | void g (void (__attribute__ ((stdcall)) *p)()) { } |
| 14 | void g (int); |
| 15 | |
| 16 | int |
| 17 | main () |
| 18 | { |
| 19 | g (&A<int>::f); |
| 20 | } |