URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [p786.C] - Rev 414
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do run }
// prms-id: 786
extern "C" int printf (const char *, ...);
extern "C" void exit(int);
class C
{
int a;
public:
C() {a = 1;}
};
void func(const C& a, C& b)
{
printf ("in const func\n");
exit(1);
}
void func(C& a, C& b)
{
printf ("in non-const func\n");
}
void testit(const C& a, C& b)
{
func(a,b);
}
int main()
{
C a;
C b;
func(a,b);
return 0;
}
Go to most recent revision | Compare with Previous | Blame | View Log