8sa1-gcc/gcc/testsuite/g++.old-deja/g++.gb/sig09.C
Jeff Law 921e5a0eb4 Initial revision
From-SVN: r14840
1997-08-19 01:34:40 -06:00

35 lines
470 B
C

// Special g++ Options: -fhandle-signatures
// GROUPS passed gb sigptr assignment initialization new
// Test assignment to/initialization of signature pointer with run-time value.
extern "C"
{
int printf (char *, ...);
}
class C
{
public:
int f (void) { return 1; }
};
signature S
{
int f (void);
};
S * p1 = new C;
int main (void)
{
S * p2 = new C;
S * p3;
p3 = new C;
if (p1->f () + p2->f () + p3->f () == 3)
printf ("PASS\n");
return 0;
}