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
ec529e25
Commit
ec529e25
authored
Nov 25, 2014
by
Jason Merrill
Committed by
Jason Merrill
Nov 25, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* pt.c (lookup_template_variable): Always unknown_type_node.
From-SVN: r218045
parent
191ec640
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
9 deletions
+17
-9
gcc/cp/ChangeLog
+4
-0
gcc/cp/pt.c
+4
-9
gcc/testsuite/g++.dg/cpp1y/var-templ17.C
+9
-0
No files found.
gcc/cp/ChangeLog
View file @
ec529e25
2014-11-24 Jason Merrill <jason@redhat.com>
* pt.c (lookup_template_variable): Always unknown_type_node.
2014-11-25 Paolo Carlini <paolo.carlini@oracle.com>
2014-11-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/63786
PR c++/63786
...
...
gcc/cp/pt.c
View file @
ec529e25
...
@@ -8026,19 +8026,14 @@ lookup_template_class (tree d1, tree arglist, tree in_decl, tree context,
...
@@ -8026,19 +8026,14 @@ lookup_template_class (tree d1, tree arglist, tree in_decl, tree context,
return
ret
;
return
ret
;
}
}
/* Return a TEMPLATE_ID_EXPR for the given variable template and ARGLIST.
/* Return a TEMPLATE_ID_EXPR for the given variable template and ARGLIST.
If the ARGLIST refers to any template parameters, the type of the
The type of the expression is the unknown_type_node since the
expression is the unknown_type_node since the template-id could
template-id could refer to an explicit or partial specialization. */
refer to an explicit or partial specialization. */
tree
tree
lookup_template_variable
(
tree
templ
,
tree
arglist
)
lookup_template_variable
(
tree
templ
,
tree
arglist
)
{
{
tree
type
;
tree
type
=
unknown_type_node
;
if
(
uses_template_parms
(
arglist
))
type
=
unknown_type_node
;
else
type
=
TREE_TYPE
(
templ
);
tsubst_flags_t
complain
=
tf_warning_or_error
;
tsubst_flags_t
complain
=
tf_warning_or_error
;
tree
parms
=
INNERMOST_TEMPLATE_PARMS
(
DECL_TEMPLATE_PARMS
(
templ
));
tree
parms
=
INNERMOST_TEMPLATE_PARMS
(
DECL_TEMPLATE_PARMS
(
templ
));
arglist
=
coerce_template_parms
(
parms
,
arglist
,
templ
,
complain
,
arglist
=
coerce_template_parms
(
parms
,
arglist
,
templ
,
complain
,
...
...
gcc/testsuite/g++.dg/cpp1y/var-templ17.C
0 → 100644
View file @
ec529e25
// DR 1727: a specialization doesn't need to have the same type
// { dg-do compile { target c++14 } }
template
<
class
T
>
T
t
=
42
;
template
<>
void
*
t
<
int
>
=
0
;
template
<
class
T
,
class
U
>
struct
same
;
template
<
class
T
>
struct
same
<
T
,
T
>
{};
same
<
void
*
,
decltype
(
t
<
int
>
)
>
s
;
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