OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [abi/] [mangle48.C] - Rev 718

Go to most recent revision | Compare with Previous | Blame | View Log

// Testcase for 'this' mangling
// { dg-options -std=c++0x }

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>();
}

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.