URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [conv9.C] - Rev 154
Compare with Previous | Blame | View Log
// { dg-do assemble }
struct
Foo
{
public:
typedef void* (*copier_fn)(void const*);
void foo() const;
void bar(char const*, void const*) const;
private:
struct
Bar
{
char const* key;
void const* item;
};
};
void
Foo::foo() const
{
Bar* cp = 0;
copier_fn copyfn = 0;
bar(cp->key, cp->item);
bar(cp->key, (copyfn) ? (*copyfn)(cp) : 0);
bar(cp->key, (copyfn) ? (*copyfn)(0) : 0);
bar(cp->key, (copyfn) ? (*copyfn)(0) : cp->item);
bar(cp->key, (copyfn) ? (*copyfn)(cp) : cp->item);
}