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++/95870] [8/9/10/11 Regression] ICE (segmentation fault) in most_general_template(), in gcc/cp/pt.c Date: Mon, 05 Apr 2021 19:39:10 +0000 [thread overview] Message-ID: <bug-95870-4-h16pnozvqp@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-95870-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95870 --- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>: https://gcc.gnu.org/g:62d60246e53778db6ee613377dd013ba4b264968 commit r11-7992-g62d60246e53778db6ee613377dd013ba4b264968 Author: Jason Merrill <jason@redhat.com> Date: Mon Apr 5 11:34:48 2021 -0400 c++: lambda in DMI in class template [PR95870] Here enclosing_instantiation_of was failing to find a match because otctx is struct S<T> and current_function_decl is S<int>::S(), so the latter has more function contexts, and we end up trying to compare S() to NULL_TREE. After spending a bit of time working on establishing the correspondence in this case (class <=> constructor), it occurred to me that we could just use DECL_SOURCE_LOCATION, which is unique for lambdas, since they cannot be redeclared. Since we're so close to release, for now I'm only doing this for the case that was failing before. gcc/cp/ChangeLog: PR c++/95870 * pt.c (enclosing_instantiation_of): Compare DECL_SOURCE_LOCATION if there is no enclosing non-lambda function. gcc/testsuite/ChangeLog: PR c++/95870 * g++.dg/cpp0x/lambda/lambda-nsdmi10.C: New test.
next prev parent reply other threads:[~2021-04-05 19:39 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-24 15:30 [Bug c++/95870] New: ICE(segmentation " viktor.rosendahl at bmw dot de 2020-06-24 16:46 ` [Bug c++/95870] " mpolacek at gcc dot gnu.org 2020-06-24 16:46 ` mpolacek at gcc dot gnu.org 2020-06-24 17:22 ` mpolacek at gcc dot gnu.org 2020-06-24 17:23 ` mpolacek at gcc dot gnu.org 2020-06-24 18:05 ` [Bug c++/95870] [8/9/10/11 Regression] ICE (segmentation " mpolacek at gcc dot gnu.org 2020-10-12 12:52 ` rguenth at gcc dot gnu.org 2021-03-12 0:37 ` mpolacek at gcc dot gnu.org 2021-03-12 0:37 ` mpolacek at gcc dot gnu.org 2021-04-05 13:53 ` jason at gcc dot gnu.org 2021-04-05 13:53 ` viktor.rosendahl at bmw dot de 2021-04-05 19:39 ` cvs-commit at gcc dot gnu.org [this message] 2021-04-05 21:30 ` [Bug c++/95870] [8/9/10 " jason at gcc dot gnu.org 2021-05-14 9:53 ` [Bug c++/95870] [9/10 " jakub at gcc dot gnu.org 2021-05-14 16:11 ` cvs-commit at gcc dot gnu.org 2021-05-20 21:35 ` cvs-commit at gcc dot gnu.org 2021-06-01 8:17 ` rguenth at gcc dot gnu.org 2022-05-13 17:41 ` [Bug c++/95870] [9 " cvs-commit at gcc dot gnu.org 2022-05-13 17:46 ` jason at gcc dot gnu.org
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-95870-4-h16pnozvqp@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).