public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/97034] [11 Regression] ICE on C++20 code: gcc_assert failure in return type deduction (gcc/cp/pt.c:26984 in type_dependent_expression_p(tree_node*))
Date: Fri, 12 Feb 2021 04:15:49 +0000	[thread overview]
Message-ID: <bug-97034-4-viY8gJ8MTL@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-97034-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #8 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Alternative patch that I'm more happy about:

--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -28761,6 +28761,7 @@ build_deduction_guide (tree type, tree ctor, tree
outer_args, tsubst_flags_t com
   tree ded_fn = build_lang_decl_loc (loc,
                     FUNCTION_DECL,
                     dguide_name (type), fntype);
+  DECL_CONTEXT (ded_fn) = type;
   DECL_ARGUMENTS (ded_fn) = fargs;
   DECL_ARTIFICIAL (ded_fn) = true;
   DECL_NONCONVERTING_P (ded_fn) = explicit_p;

  parent reply	other threads:[~2021-02-12  4:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-12 14:51 [Bug c++/97034] New: " dimitri.gorokhovik at free dot fr
2020-09-13 22:16 ` [Bug c++/97034] [11 Regression] " mpolacek at gcc dot gnu.org
2020-09-16 16:27 ` mpolacek at gcc dot gnu.org
2020-09-16 18:02 ` mpolacek at gcc dot gnu.org
2020-09-16 18:42 ` mpolacek at gcc dot gnu.org
2020-10-12 11:52 ` rguenth at gcc dot gnu.org
2021-01-09  4:42 ` arthur.j.odwyer at gmail dot com
2021-02-12  1:27 ` mpolacek at gcc dot gnu.org
2021-02-12  1:44 ` mpolacek at gcc dot gnu.org
2021-02-12  4:15 ` mpolacek at gcc dot gnu.org [this message]
2021-03-03 14:53 ` cvs-commit at gcc dot gnu.org
2021-03-03 15:04 ` mpolacek 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-97034-4-viY8gJ8MTL@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).