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++.law/] [operators16.C] - Rev 307
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do run }
// GROUPS passed operators
// copy file
// From: gfm@mencon.mencon.oz.au (Graham Menhennitt)
// Date: Thu, 29 Apr 93 20:53:07 EST
// Subject: 4 bugs in g++ 2.3.3
// Message-ID: <9304291053.AA00090@mencon>
#include <stdio.h>
int pass = 0;
struct A {
A(void) {}
A(const A& a) { ; }
A& operator = (const A& a) { pass = 1; return *this; }
};
struct B {
B(const A& aa) { B::a = aa; }
A a;
};
int main(void)
{
B b = A();
if (pass)
printf ("PASS\n");
else
{ printf ("FAIL\n"); return 1; }
}
Go to most recent revision | Compare with Previous | Blame | View Log