* gcc.target/i386/mpx/hard-reg-1-nov.c (mpx_test): Use "esp"
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / mi1.C
blob8d622ef6f2eb62be69ecf390fd477d275cdb792c
1 // { dg-do run  }
2 // Test that binfos aren't erroneously shared between instantiations.
4 class PK_CryptoSystem
6 };
7 class PK_Encryptor : public virtual PK_CryptoSystem
9 };
10 class PK_FixedLengthCryptoSystem : public virtual PK_CryptoSystem
12 public:
13         virtual unsigned int CipherTextLength() const =0;
15 class PK_FixedLengthEncryptor : public virtual PK_Encryptor, public virtual PK_FixedLengthCryptoSystem
18 class PK_SignatureSystem
20 public:
21         virtual ~PK_SignatureSystem() {}
23 class PK_Signer : public virtual PK_SignatureSystem
25 public:
26         virtual void Sign() = 0;
28 class PK_Verifier : public virtual PK_SignatureSystem
31 class PK_Precomputation
34 template <class T> class
35 PK_WithPrecomputation : public T, public virtual PK_Precomputation
38 typedef PK_WithPrecomputation<PK_FixedLengthEncryptor> PKWPFLE;
39 typedef PK_WithPrecomputation<PK_Signer> PKWPS;
40 template <class EC> class
41 ECPublicKey : public PKWPFLE
43 public:
44         unsigned int CipherTextLength() const { return 1; }
45         EC ec;
47 template <class EC>
48 class ECPrivateKey : public ECPublicKey<EC>, public PKWPS
50         void Sign() {}
51         int d;
53 template <class EC>
54 class ECKEP : public ECPrivateKey<EC>
57 class GF2NT : public PK_CryptoSystem
59         int t1;
61 class EC2N : public PK_CryptoSystem
63         GF2NT field;
64         int a;
66 template class ECKEP<EC2N>;
67 template class ECKEP<int>;
69 int
70 main ()
72   ECKEP<EC2N> foo;
74   return 0;