This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [c++-concepts] Fix assertion failure with cp_maybe_constrained_type_specifier


Committed as r211935. I updated the patch to add a more appropriate
comment and changelog entry.

Andrew

On Tue, Jun 24, 2014 at 8:07 AM, Ed Smith-Rowland <3dw4rd@verizon.net> wrote:
> I saw this during bootstrap.  I've verified that the patch works (I was
> working on similar).
>
> Ed
>
Index: parser.c
===================================================================
--- parser.c	(revision 211591)
+++ parser.c	(working copy)
@@ -15175,9 +15175,15 @@ cp_parser_allows_constrained_type_specif
 static tree
 cp_maybe_constrained_type_specifier (cp_parser *parser, tree decl, tree args)
 {
-  gcc_assert (TREE_CODE (decl) == OVERLOAD);
   gcc_assert (args ? TREE_CODE (args) == TREE_VEC : true);
 
+  // If we get a reference to a member function, allow the referenced
+  // functions to participate in this resolution: the baselink may refer
+  // to a static member concept.
+  if (BASELINK_P (decl))
+    decl = BASELINK_FUNCTIONS (decl);
+  gcc_assert (TREE_CODE (decl) == OVERLOAD);
+
   // Don't do any heavy lifting if we know we're not in a context
   // where it could succeed.
   if (!cp_parser_allows_constrained_type_specifier (parser))

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]