| 1 |
// { dg-do compile } |
| 2 |
// { dg-options "-fabi-version=10" } |
| 3 |
|
| 4 |
// Mangling of classes from std::decimal are special-cased. |
| 5 |
// Derived from g++.dg/abi/mangle13.C. |
| 6 |
|
| 7 |
namespace std { |
| 8 |
namespace decimal { |
| 9 |
class decimal64 { |
| 10 |
public: |
| 11 |
typedef float __decfloat64 __attribute__ ((mode (DD))); |
| 12 |
explicit decimal64 (float __r):__val (__r) {} |
| 13 |
private: |
| 14 |
__decfloat64 __val; |
| 15 |
}; |
| 16 |
} |
| 17 |
} |
| 18 |
|
| 19 |
struct A { |
| 20 |
template <typename T> std::decimal::decimal64 f (); |
| 21 |
std::decimal::decimal64 operator+(); |
| 22 |
operator std::decimal::decimal64 (); |
| 23 |
template <typename T> |
| 24 |
std::decimal::decimal64 operator-(); |
| 25 |
}; |
| 26 |
|
| 27 |
typedef std::decimal::decimal64 (A::*P)(); |
| 28 |
|
| 29 |
template <P> struct S {}; |
| 30 |
|
| 31 |
template <typename T> void g (S<&T::template f<std::decimal::decimal64> >) {} |
| 32 |
template <typename T> void g (S<&T::operator+ >) {} |
| 33 |
template <typename T> void g (S<&T::operator std::decimal::decimal64>) {} |
| 34 |
template <typename T> void g (S<&T::template operator- <std::decimal::decimal64> >) {} |
| 35 |
|
| 36 |
template void g<A> (S<&A::f<std::decimal::decimal64> >); |
| 37 |
template void g<A> (S<&A::operator+>); |
| 38 |
template void g<A> (S<&A::operator std::decimal::decimal64>); |
| 39 |
|
| 40 |
// { dg-final { scan-assembler "\n?_Z1gI1AEv1SIXadsrT_1fIDdEEE\[: \t\n\]" } } |
| 41 |
// { dg-final { scan-assembler "\n?_Z1gI1AEv1SIXadsrT_plEE\[: \t\n\]" } } |