| 1 |
// Test mangling of type casts |
| 2 |
// { dg-options "-fabi-version=0 -fabi-compat-version=0 -Wabi=5" } |
| 3 |
// { dg-do compile } |
| 4 |
|
| 5 |
template<int i> class A {}; |
| 6 |
template<bool b> class B {}; |
| 7 |
|
| 8 |
template<int i> void f(A<i> &, B<bool(i)> &) {} |
| 9 |
template<int i> void g(A<i> &, B<static_cast<bool>(i)> &) {} // { dg-warning "mangle" } |
| 10 |
|
| 11 |
int main() |
| 12 |
{ |
| 13 |
A<1> a; |
| 14 |
B<true> b; |
| 15 |
f(a, b); |
| 16 |
g(a, b); |
| 17 |
} |
| 18 |
|
| 19 |
// { dg-final { scan-assembler "\n_?_Z1fILi1EEvR1AIXT_EER1BIXcvbT_EE\[: \t\n\]" } } |
| 20 |
// { dg-final { scan-assembler "\n_?_Z1gILi1EEvR1AIXT_EER1BIXscbT_EE\[: \t\n\]" } } |