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
31d8a3ac
Commit
31d8a3ac
authored
Jul 25, 2001
by
Jason Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved to dg
From-SVN: r44349
parent
50011802
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
34 deletions
+0
-34
gcc/testsuite/g++.old-deja/g++.ext/instantiate1.C
+0
-34
No files found.
gcc/testsuite/g++.old-deja/g++.ext/instantiate1.C
deleted
100644 → 0
View file @
50011802
// 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
();
};
template
<
class
T
>
void
A
<
T
>::
f
()
{
}
extern
template
struct
A
<
int
>
;
// These functions must be defined in a single line, so that, even if
// constants or pointers are placed in the code section (for example,
// on the SH), we still get the same line numbers.
void
test_f_int
()
{
f
(
42
);
}
// ERROR - not instantiated
void
test_A_int_f
()
{
A
<
int
>
a
;
a
.
f
();
}
// ERROR - not instantiated
void
test_f_double
()
{
f
(
2
.
0
);
}
// gets bogus error
void
test_A_double_f
()
{
A
<
double
>
b
;
b
.
f
();
}
// gets bogus error
int
main
()
{
test_f_int
();
test_A_int_f
();
test_f_double
();
test_A_double_f
();
}
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