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
842562b4
Commit
842562b4
authored
Mar 23, 2017
by
Jason Merrill
Committed by
Jason Merrill
Mar 23, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PR c++/80150 - ICE with overloaded variadic deduction.
* pt.c (try_one_overload): Remove asserts. From-SVN: r246422
parent
de2b3f5c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
3 deletions
+27
-3
gcc/cp/ChangeLog
+3
-0
gcc/cp/pt.c
+4
-3
gcc/testsuite/g++.dg/cpp0x/variadic-unify-3.C
+20
-0
No files found.
gcc/cp/ChangeLog
View file @
842562b4
2017-03-23 Jason Merrill <jason@redhat.com>
2017-03-23 Jason Merrill <jason@redhat.com>
PR c++/80150 - ICE with overloaded variadic deduction.
* pt.c (try_one_overload): Remove asserts.
PR c++/77563 - missing ambiguous conversion error.
PR c++/77563 - missing ambiguous conversion error.
* call.c (convert_like_real): Use LOOKUP_IMPLICIT.
* call.c (convert_like_real): Use LOOKUP_IMPLICIT.
...
...
gcc/cp/pt.c
View file @
842562b4
...
@@ -19694,9 +19694,10 @@ try_one_overload (tree tparms,
...
@@ -19694,9 +19694,10 @@ try_one_overload (tree tparms,
is equivalent to the corresponding explicitly specified argument.
is equivalent to the corresponding explicitly specified argument.
We may have deduced more arguments than were explicitly specified,
We may have deduced more arguments than were explicitly specified,
and that's OK. */
and that's OK. */
gcc_assert
(
ARGUMENT_PACK_INCOMPLETE_P
(
oldelt
));
gcc_assert
(
ARGUMENT_PACK_ARGS
(
oldelt
)
/* We used to assert ARGUMENT_PACK_INCOMPLETE_P (oldelt) here, but
==
ARGUMENT_PACK_EXPLICIT_ARGS
(
oldelt
));
that's wrong if we deduce the same argument pack from multiple
function arguments: it's only incomplete the first time. */
tree
explicit_pack
=
ARGUMENT_PACK_ARGS
(
oldelt
);
tree
explicit_pack
=
ARGUMENT_PACK_ARGS
(
oldelt
);
tree
deduced_pack
=
ARGUMENT_PACK_ARGS
(
elt
);
tree
deduced_pack
=
ARGUMENT_PACK_ARGS
(
elt
);
...
...
gcc/testsuite/g++.dg/cpp0x/variadic-unify-3.C
0 → 100644
View file @
842562b4
// PR c++/80150
// { dg-do compile { target c++11 } }
template
<
typename
R
,
typename
...
Args
>
bool
compare_functions
(
R
(
*
funcA
)(
Args
...),
R
(
*
funcB
)(
Args
...),
Args
...
args
)
{
return
false
;
}
int
foo
(
int
x
)
{
return
x
;
}
float
foo
(
float
x
)
{
return
x
;
}
int
main
()
{
int
a
=
10
;
compare_functions
<
int
>
(
foo
,
foo
,
a
);
}
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