cp_maybe_constrained_type_specifier asserted that the decl passed in
would be of type OVERLOAD, however a clean build of the compiler was
broken since it could also be a BASELINK. I'm not entirely sure when
this is the case, except that it seems to happen with class member
templates as it also caused a test case in my next patch to fail. The
solution is to check for a BASELINK and extract the functions from it.
The possibility of decl being a BASELINK is asserted near the call in
cp_parser_template_id (cp_maybe_partial_concept_id just calls the
function in question at this time).
2014-06-17 Braden Obrzut <ad...@maniacsvault.net>
* gcc/cp/parser.c (cp_maybe_constrained_type_specifier): Fix assertion
failure if baselink was passed in as decl.
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 1eaf863..40d1d63 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -15175,6 +15175,9 @@ cp_parser_allows_constrained_type_specifier (cp_parser *parser)
static tree
cp_maybe_constrained_type_specifier (cp_parser *parser, tree decl, tree args)
{
+ if (BASELINK_P (decl))
+ decl = BASELINK_FUNCTIONS (decl);
+
gcc_assert (TREE_CODE (decl) == OVERLOAD);
gcc_assert (args ? TREE_CODE (args) == TREE_VEC : true);