From: Jason Merrill Date: Sun, 31 May 1998 23:57:47 +0000 (-0400) Subject: new X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=299e66e590a0f4069983318c33e4ff244b1ba2ff;p=platform%2Fupstream%2Fgcc.git new From-SVN: r20159 --- diff --git a/gcc/testsuite/g++.old-deja/g++.pt/mi1.C b/gcc/testsuite/g++.old-deja/g++.pt/mi1.C new file mode 100644 index 0000000..8282261 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/mi1.C @@ -0,0 +1,75 @@ +// Test that binfos aren't erroneously shared between instantiations. + +class PK_CryptoSystem +{ +}; +class PK_Encryptor : public virtual PK_CryptoSystem +{ +}; +class PK_FixedLengthCryptoSystem : public virtual PK_CryptoSystem +{ +public: + virtual unsigned int CipherTextLength() const =0; +}; +class PK_FixedLengthEncryptor : public virtual PK_Encryptor, public virtual PK_FixedLengthCryptoSystem +{ +}; +class PK_SignatureSystem +{ +public: + virtual ~PK_SignatureSystem() {}; +}; +class PK_Signer : public virtual PK_SignatureSystem +{ +public: + virtual void Sign() = 0; +}; +class PK_Verifier : public virtual PK_SignatureSystem +{ +}; +class PK_Precomputation +{ +}; +template class +PK_WithPrecomputation : public T, public virtual PK_Precomputation +{ +}; +typedef PK_WithPrecomputation PKWPFLE; +typedef PK_WithPrecomputation PKWPS; +template class +ECPublicKey : public PKWPFLE +{ +public: + unsigned int CipherTextLength() const { return 1; } + EC ec; +}; +template +class ECPrivateKey : public ECPublicKey, public PKWPS +{ + void Sign() {} + int d; +}; +template +class ECKEP : public ECPrivateKey +{ +}; +class GF2NT : public PK_CryptoSystem +{ + int t1; +}; +class EC2N : public PK_CryptoSystem +{ + GF2NT field; + int a; +}; +template class ECKEP; +template class ECKEP; + +int +main () +{ + ECKEP foo; + + return 0; +} + diff --git a/gcc/testsuite/g++.old-deja/g++.pt/vbase1.C b/gcc/testsuite/g++.old-deja/g++.pt/vbase1.C new file mode 100644 index 0000000..58d26fc --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/vbase1.C @@ -0,0 +1,31 @@ +// Check that template classes handle inherited virtual bases +// properly, initializing them before direct non-virtual bases. + +int aflag; + +struct A +{ + A() { aflag = 1; } +}; + +struct B : virtual public A +{ + B() { } +}; + +struct C +{ + C() { if (!aflag) exit (1); } +}; + +template +struct D : public C, public Parent +{ + D() { } +}; + +int +main () +{ + D c; +}