Debian Codegraph @

gcc/testsuite/g++.dg/abi/mangle49.C

raw
1 // PR c++/49932
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-fabi-version=0 -fabi-compat-version=0 -Wabi=2" }
4
5 template < typename T >
6 auto
7 f1( T x ) // { dg-warning "mangle" }
8 -> typename decltype( x )::type {}
9
10 template < typename T >
11 typename decltype( T() )::type
12 f2( T x ) {} // ICE on here
13
14 struct S { typedef void type; };
15
16 void g()
17 {
18 f1( S() );
19 f2( S() );
20 }
21
22 // { dg-final { scan-assembler "\n_?_Z2f1I1SENDtfp_E4typeET_\[: \t\n\]" } }
23 // { dg-final { scan-assembler "\n_?_Z2f2I1SENDTcvT__EE4typeES1_\[: \t\n\]" } }