Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/abi/mangle48.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// Testcase for 'this' mangling // { dg-do compile { target c++11 } } struct B { template <class U> U f(); }; struct A { B b; // { dg-final { scan-assembler "_ZN1A1fIiEEDTcldtdtdefpT1b1fIT_EEEv" } } template <class U> auto f() -> decltype (b.f<U>()); // { dg-final { scan-assembler "_ZN1A1gIiEEDTcldtptfpT1b1fIT_EEEv" } } template <class U> auto g() -> decltype (this->b.f<U>()); // { dg-final { scan-assembler "_ZN1A1hIiEEDTcldtdtdefpT1bsr1B1fIT_EEEv" } } template <class U> auto h() -> decltype (b.B::f<U>()); // { dg-final { scan-assembler "_ZN1A1iIiEEDTcldtptfpT1bsr1B1fIT_EEEv" } } template <class U> auto i() -> decltype (this->b.B::f<U>()); }; int main() { A a; a.f<int>(); a.g<int>(); a.h<int>(); a.i<int>(); }