Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
299e66e5
Commit
299e66e5
authored
May 31, 1998
by
Jason Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new
From-SVN: r20159
parent
1ceaad38
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
106 additions
and
0 deletions
+106
-0
gcc/testsuite/g++.old-deja/g++.pt/mi1.C
+75
-0
gcc/testsuite/g++.old-deja/g++.pt/vbase1.C
+31
-0
No files found.
gcc/testsuite/g++.old-deja/g++.pt/mi1.C
0 → 100644
View file @
299e66e5
// 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
T
>
class
PK_WithPrecomputation
:
public
T
,
public
virtual
PK_Precomputation
{
};
typedef
PK_WithPrecomputation
<
PK_FixedLengthEncryptor
>
PKWPFLE
;
typedef
PK_WithPrecomputation
<
PK_Signer
>
PKWPS
;
template
<
class
EC
>
class
ECPublicKey
:
public
PKWPFLE
{
public
:
unsigned
int
CipherTextLength
()
const
{
return
1
;
}
EC
ec
;
};
template
<
class
EC
>
class
ECPrivateKey
:
public
ECPublicKey
<
EC
>
,
public
PKWPS
{
void
Sign
()
{}
int
d
;
};
template
<
class
EC
>
class
ECKEP
:
public
ECPrivateKey
<
EC
>
{
};
class
GF2NT
:
public
PK_CryptoSystem
{
int
t1
;
};
class
EC2N
:
public
PK_CryptoSystem
{
GF2NT
field
;
int
a
;
};
template
class
ECKEP
<
EC2N
>
;
template
class
ECKEP
<
int
>
;
int
main
()
{
ECKEP
<
EC2N
>
foo
;
return
0
;
}
gcc/testsuite/g++.old-deja/g++.pt/vbase1.C
0 → 100644
View file @
299e66e5
// 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
<
class
Parent
>
struct
D
:
public
C
,
public
Parent
{
D
()
{
}
};
int
main
()
{
D
<
B
>
c
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment