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++/97582] [9/10/11 Regression] ICE tree check: expected function_type or method_type, have error_mark in add_function_candidate, at cp/call.c:2146 since r9-6405-gbddee796d0b4800b
Date: Thu, 11 Feb 2021 16:00:36 +0000	[thread overview]
Message-ID: <bug-97582-4-L6zwRE9nSZ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-97582-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97582

--- Comment #3 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:cb168f779c87c1e0c37d22ea82dfb93ff8c873bc

commit r11-7191-gcb168f779c87c1e0c37d22ea82dfb93ff8c873bc
Author: Patrick Palka <ppalka@redhat.com>
Date:   Thu Feb 11 10:59:54 2021 -0500

    c++: Fix ICE from op_unqualified_lookup [PR97582]

    In this testcase, we're crashing because the lookup of operator+ from
    within the generic lambda via lookup_name finds multiple bindings
    (C1::operator+ and C2::operator+) and returns a TREE_LIST thereof,
    something which op_unqualified_lookup (and push_operator_bindings) isn't
    prepared to handle.

    This patch extends op_unqualified_lookup and push_operator_bindings
    to handle such an ambiguous lookup result in the natural way.

    gcc/cp/ChangeLog:

            PR c++/97582
            * name-lookup.c (op_unqualified_lookup): Handle an ambiguous
            lookup result by discarding it if the first element is a
            class-scope declaration, otherwise return it.
            (push_operator_bindings): Handle an ambiguous lookup result by
            doing push_local_binding on each element in the list.

    gcc/testsuite/ChangeLog:

            PR c++/97582
            * g++.dg/cpp0x/lambda/lambda-template17.C: New test.

  parent reply	other threads:[~2021-02-11 16:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26 14:08 [Bug c++/97582] New: Regression Internal compiler error in lambda benjamin.freist at hexagon dot com
2020-10-26 14:59 ` [Bug c++/97582] [9/10/11 Regression] ICE tree check: expected function_type or method_type, have error_mark in add_function_candidate, at cp/call.c:2146 since r9-6405-gbddee796d0b4800b marxin at gcc dot gnu.org
2021-01-14  9:31 ` rguenth at gcc dot gnu.org
2021-02-02  5:23 ` ppalka at gcc dot gnu.org
2021-02-11 16:00 ` cvs-commit at gcc dot gnu.org [this message]
2021-02-11 16:01 ` [Bug c++/97582] [9/10 " ppalka at gcc dot gnu.org
2021-06-01  8:18 ` rguenth at gcc dot gnu.org
2022-05-27  9:43 ` [Bug c++/97582] [10 " rguenth at gcc dot gnu.org
2022-06-28 10:42 ` jakub at gcc dot gnu.org
2023-07-07  9:10 ` rguenth 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-97582-4-L6zwRE9nSZ@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: link
Be 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).