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
b9d969b7
Commit
b9d969b7
authored
Jun 02, 2000
by
Jason Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new
From-SVN: r34366
parent
c9b39473
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
0 deletions
+57
-0
gcc/testsuite/g++.old-deja/g++.ext/instantiate1.C
+23
-0
gcc/testsuite/g++.old-deja/g++.ext/instantiate2.C
+17
-0
gcc/testsuite/g++.old-deja/g++.ext/instantiate3.C
+17
-0
No files found.
gcc/testsuite/g++.old-deja/g++.ext/instantiate1.C
0 → 100644
View file @
b9d969b7
// Test that 'extern template' suppresses instantiations.
// Special g++ Options: -g -O
// Ignore the 'ld returned 1' message from collect2.
// excess errors test - XFAIL *-*-*
template
<
class
T
>
void
f
(
T
)
{
}
extern
template
void
f
(
int
);
template
<
class
T
>
struct
A
{
void
f
()
{
}
};
extern
template
struct
A
<
int
>
;
int
main
()
{
f
(
42
);
// ERROR - not instantiated
A
<
int
>
a
;
a
.
f
();
// ERROR - not instantiated
f
(
2
.
0
);
// gets bogus error
A
<
double
>
b
;
b
.
f
();
// gets bogus error
}
gcc/testsuite/g++.old-deja/g++.ext/instantiate2.C
0 → 100644
View file @
b9d969b7
// Test that 'static template' instantiates statics.
// Special g++ Options: -g -fno-implicit-templates
// Ignore the 'ld returned 1' message from collect2.
// excess errors test - XFAIL *-*-*
template
<
class
T
>
struct
A
{
static
T
t
;
};
template
<
class
T
>
T
A
<
T
>::
t
=
0
;
static
template
struct
A
<
int
>
;
int
main
()
{
A
<
int
>::
t
=
42
;
// gets bogus error
A
<
char
>::
t
=
42
;
// ERROR - not instantiated
}
gcc/testsuite/g++.old-deja/g++.ext/instantiate3.C
0 → 100644
View file @
b9d969b7
// Test that 'inline template' instantiates the vtable.
// Special g++ Options: -g -O -fno-implicit-templates
// Ignore the 'ld returned 1' message from collect2.
// excess errors test - XFAIL *-*-*
template
<
class
T
>
struct
A
{
virtual
void
f
()
{
}
};
inline
template
struct
A
<
int
>
;
A
<
int
>
a
;
// gets bogus error
A
<
char
>
b
;
// ERROR - not instantiated
int
main
()
{
}
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