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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [overload7.C] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
// { dg-do run  }
// { dg-do run  }
// Check that object call works when there are multiple conversion ops
// Check that object call works when there are multiple conversion ops
// returning the same type.
// returning the same type.
typedef int (*pfn)();
typedef int (*pfn)();
int zero () { return 0; }
int zero () { return 0; }
int one  () { return 1; }
int one  () { return 1; }
int two  () { return 2; }
int two  () { return 2; }
struct A {
struct A {
  A() { }
  A() { }
  operator pfn () { return one; }
  operator pfn () { return one; }
  operator pfn () const { return zero; }
  operator pfn () const { return zero; }
  operator pfn () volatile { return two; }
  operator pfn () volatile { return two; }
};
};
int
int
main ()
main ()
{
{
  const A a;
  const A a;
  return a();
  return a();
}
}
 
 

powered by: WebSVN 2.1.0

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