URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [ext/] [attr-alias-2.C] - Rev 821
Go to most recent revision | Compare with Previous | Blame | View Log
/* { dg-do run } */
/* { dg-require-alias "" } */
#include <typeinfo>
struct Klass
{
int implementation () const;
virtual int magic () const;
};
int Klass::implementation (void) const
{
return 0;
}
int Klass::magic () const
__attribute__ ((alias ("_ZNK5Klass14implementationEv")));
int __attribute__ ((noinline))
Foo (Klass const *ptr)
{
if (ptr->magic () != 0)
return 1;
if (typeid (*ptr) != typeid (Klass))
return 2;
return 0;
}
int main ()
{
Klass obj;
return Foo (&obj);
}
Go to most recent revision | Compare with Previous | Blame | View Log