gcc/testsuite/g++.old-deja/g++.pt/t32.C
raw| 1 | // { dg-do assemble } |
| 2 | |
| 3 | template <class X> struct A { |
| 4 | int fooo (int x); |
| 5 | int x; |
| 6 | inline int y () { return 3; } |
| 7 | inline int z () { return 5; } |
| 8 | }; |
| 9 | |
| 10 | template <class Y> int A<Y>::fooo (int t) { return (this->*(x?&A<Y>::y : &A<Y>::z))() + t; } // { dg-bogus "" } |
| 11 | |
| 12 | A<int> ai; |
| 13 | |
| 14 | int frop () { return ai.fooo (100); } |