public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error since r10-7554-gf1ad7bac76b66257 Date: Thu, 23 Apr 2020 21:42:10 +0000 [thread overview] Message-ID: <bug-94645-4-VQtF7jBcc4@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-94645-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94645 --- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>: https://gcc.gnu.org/g:f9f166251f181ddcee64092d89aecbc1166ca706 commit r10-7932-gf9f166251f181ddcee64092d89aecbc1166ca706 Author: Patrick Palka <ppalka@redhat.com> Date: Thu Apr 23 17:29:55 2020 -0400 c++: Lambda in friend of constrained class [PR94645] In the testcase below, when grokfndecl processes the operator() decl for the lambda inside the friend function foo, processing_template_decl is rightly 1, but template_class_depth on the lambda's closure type incorrectly returns 0 instead of 1. Since processing_template_decl > template_class_depth, this makes grokfndecl think that the operator() has its own set of template arguments, and so we attach the innermost set of constraints -- those belonging to struct l -- to the operator() decl. We then get confused when checking constraints_satisfied_p on the operator() because it doesn't have template information and yet has constraints associated with it. This patch fixes template_class_depth to return the correct template nesting level in cases like these, in that when it hits a friend function it walks into the DECL_FRIEND_CONTEXT of the friend rather than into the CP_DECL_CONTEXT. gcc/cp/ChangeLog: PR c++/94645 * pt.c (template_class_depth): Walk into the DECL_FRIEND_CONTEXT of a friend declaration rather than into its CP_DECL_CONTEXT. gcc/testsuite/ChangeLog: PR c++/94645 * g++.dg/cpp2a/concepts-lambda6.C: New test.
next prev parent reply other threads:[~2020-04-23 21:42 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-18 4:22 [Bug c++/94645] New: incorrect concecpt evaluation with decltype, plus internal erropr avi@cloudius-systems.com 2020-04-18 4:26 ` [Bug c++/94645] " avi@cloudius-systems.com 2020-04-19 21:58 ` [Bug c++/94645] incorrect concept " rafael at espindo dot la 2020-04-20 6:58 ` [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error rguenth at gcc dot gnu.org 2020-04-20 7:28 ` marxin at gcc dot gnu.org 2020-04-20 9:04 ` avi@cloudius-systems.com 2020-04-20 9:19 ` [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error since r10-7554-gf1ad7bac76b66257 marxin at gcc dot gnu.org 2020-04-20 9:19 ` marxin at gcc dot gnu.org 2020-04-21 12:52 ` ppalka at gcc dot gnu.org 2020-04-21 12:54 ` ppalka at gcc dot gnu.org 2020-04-21 15:17 ` ppalka at gcc dot gnu.org 2020-04-21 19:08 ` rafael at espindo dot la 2020-04-21 23:21 ` ppalka at gcc dot gnu.org 2020-04-23 4:38 ` jason at gcc dot gnu.org 2020-04-23 13:15 ` ppalka at gcc dot gnu.org 2020-04-23 21:42 ` cvs-commit at gcc dot gnu.org [this message] 2020-04-23 21:42 ` ppalka at gcc dot gnu.org 2020-04-23 23:43 ` rafael at espindo dot la
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-94645-4-VQtF7jBcc4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).