| 1 |
// PR c++/109790 |
| 2 |
// This used to work until GCC 10; force the usage of ABI 15 (the highest |
| 3 |
// usable in GCC 10) and check that the mangling (actually wrong; see |
| 4 |
// decltyp83a.C) matches that of GCC 10's default ABI version (14). |
| 5 |
|
| 6 |
// { dg-do compile { target c++11 } } |
| 7 |
// { dg-additional-options "-fabi-version=15" } |
| 8 |
|
| 9 |
struct A { |
| 10 |
template<class T> void operator+(T); |
| 11 |
}; |
| 12 |
|
| 13 |
template<class T> |
| 14 |
decltype(&A::operator+<T>) f(); |
| 15 |
|
| 16 |
int main() { |
| 17 |
f<int>(); |
| 18 |
} |
| 19 |
|
| 20 |
// { dg-final { scan-assembler "_Z1fIiEDTadsr1AplIT_EEv" } } |