gcc/testsuite/g++.dg/abi/mangle53.C
raw| 1 | // { dg-do compile { target c++11 } } |
| 2 | // { dg-additional-options -fabi-compat-version=0 } |
| 3 | |
| 4 | bool b; |
| 5 | int i; |
| 6 | // { dg-final { scan-assembler "_Z1fIiEDTquL_Z1bEfp_twLi42EET_" } } |
| 7 | template <class T> auto f (T t) -> decltype(b?t:throw 42) { return i; } |
| 8 | // { dg-final { scan-assembler "_Z2f2IiEDTquL_Z1bEfp_trET_" } } |
| 9 | template <class T> auto f2 (T t) -> decltype(b?t:throw) { return i; } |
| 10 | |
| 11 | int main() |
| 12 | { |
| 13 | f(0); |
| 14 | f2(0); |
| 15 | } |