OSDN Git Service

PR c++/24260
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / ext / tmplattr1.C
1 // PR c++/24260
2 // { dg-do compile { target i?86-*-* x86_64-*-* } }
3 // { dg-require-effective-target ilp32 }
4
5 #define stdcall __attribute__((stdcall))
6
7 struct T {
8   template <class S>
9   static int stdcall func(int arg1, int arg2);
10 };
11
12 template <class S>
13 int stdcall T::func(int arg1, int arg2)
14 {
15   return arg1+arg2;
16 }
17
18 struct dummy {};
19
20 void xx()
21 {
22   int (stdcall *ptr2)(int,int) = &T::func<dummy>;
23 }
24