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
a98d45ff
Commit
a98d45ff
authored
Sep 28, 1997
by
Jason Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new tests and adjustments for explicit function template qualification
From-SVN: r15777
parent
905a881f
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
56 additions
and
7 deletions
+56
-7
gcc/testsuite/g++.old-deja/g++.brendan/template9.C
+1
-0
gcc/testsuite/g++.old-deja/g++.jason/tempinst1.C
+5
-3
gcc/testsuite/g++.old-deja/g++.jason/template13.C
+1
-1
gcc/testsuite/g++.old-deja/g++.jason/template38.C
+1
-1
gcc/testsuite/g++.old-deja/g++.law/template2.C
+1
-0
gcc/testsuite/g++.old-deja/g++.pt/explicit36.C
+24
-0
gcc/testsuite/g++.old-deja/g++.pt/explicit37.C
+23
-0
gcc/testsuite/g++.old-deja/g++.pt/memtemp20.C
+0
-2
No files found.
gcc/testsuite/g++.old-deja/g++.brendan/template9.C
View file @
a98d45ff
// GROUPS passed templates
// Test that the compiler will emit the definition of min given just
// the declaration. At one point in the past, it did not.
// Special g++ Options: -fguiding-decls
#include <iostream.h>
template
<
class
T
>
inline
T
min
(
T
a
,
T
b
)
{
return
(
a
<
b
)
?
a
:
b
;};
...
...
gcc/testsuite/g++.old-deja/g++.jason/tempinst1.C
View file @
a98d45ff
...
...
@@ -6,12 +6,14 @@ struct ostream {
ostream
&
operator
<<
(
const
char
*
)
{
return
*
this
;
};
};
template
<
class
T
>
class
foo
{
friend
ostream
&
operator
<<
(
ostream
&
,
foo
<
T
>&
);
};
template
<
class
T
>
class
foo
;
template
<
class
T
>
ostream
&
operator
<<
(
ostream
&
ios
,
foo
<
T
>&
obj
)
{
};
template
<
class
T
>
class
foo
{
friend
ostream
&
operator
<<<>
(
ostream
&
,
foo
<
T
>&
);
};
int
main
()
{
ostream
cout
;
...
...
gcc/testsuite/g++.old-deja/g++.jason/template13.C
View file @
a98d45ff
// Bug: g++ fails to actually instantiate templates to the specifications of
// guiding decls.
// Special g++ Options: -g -ansi -pedantic-errors
// Special g++ Options: -g -ansi -pedantic-errors
-fguiding-decls
template
<
class
T
>
inline
T
min
(
T
a
,
T
b
)
{
return
a
<
b
?
a
:
b
;
}
double
min
(
double
,
double
);
...
...
gcc/testsuite/g++.old-deja/g++.jason/template38.C
View file @
a98d45ff
// Special g++ Options: -f
ansi-overloading
// Special g++ Options: -f
guiding-decls
struct
A
{
friend
int
operator
==
(
const
A
&
,
const
A
&
);
...
...
gcc/testsuite/g++.old-deja/g++.law/template2.C
View file @
a98d45ff
// GROUPS passed templates
// Special g++ Options: -fguiding-decls
extern
"C"
void
printf
(
char
*
,
...);
template
<
class
T
>
T
max
(
T
a
,
T
b
)
{
return
a
>
b
?
a
:
b
;
}
...
...
gcc/testsuite/g++.old-deja/g++.pt/explicit36.C
0 → 100644
View file @
a98d45ff
// Build don't run:
// GROUPS passed templates
template
<
class
T
>
void
foo
(
T
);
class
S
{
friend
void
foo
<>
(
int
);
int
i
;
};
template
<>
void
foo
(
int
)
{
S
s
;
s
.
i
=
3
;
}
int
main
()
{
foo
(
3
);
}
gcc/testsuite/g++.old-deja/g++.pt/explicit37.C
0 → 100644
View file @
a98d45ff
// Build don't run:
// GROUPS passed templates
class
ostream
{};
template
<
class
T
>
class
S
;
template
<
class
T
>
void
operator
<<
(
ostream
&
,
S
<
T
>
)
{}
template
<
class
T
>
class
S
{
friend
void
operator
<<<>
(
ostream
&
,
const
S
<
T
>
);
};
int
main
()
{
ostream
o
;
o
<<
S
<
int
>
();
}
gcc/testsuite/g++.old-deja/g++.pt/memtemp20.C
View file @
a98d45ff
...
...
@@ -10,7 +10,6 @@ struct S
template
<
class
U
>
void
foo
(
char
*
,
U
);
template
<>
void
foo
(
int
i
);
};
...
...
@@ -28,7 +27,6 @@ void S::foo(char*, U u)
}
template
<>
void
S
::
foo
(
int
i
)
{
printf
(
"int version
\n
"
);
...
...
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