public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dani at danielbertalan dot dev" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/114784] [14 Regression] Inlining fails for always_inline inheriting constructor
Date: Fri, 19 Apr 2024 22:00:34 +0000	[thread overview]
Message-ID: <bug-114784-4-VOYeTknAZR@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114784-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from Daniel Bertalan <dani at danielbertalan dot dev> ---
I tried Jakub's patch (thank you for the super quick response!), it crashes if
the constructor has non-type template parameters:


template <typename> struct SpanImpl {
  template <long> SpanImpl();
};
template <typename T> struct Span : SpanImpl<T> {
  using SpanImpl<T>::SpanImpl;
};

Span<char> c = {};

$ g++ -std=c++20 crash.cpp

crash.cpp: In instantiation of 'struct Span<char>':
crash.cpp:8:12:   required from here
    8 | Span<char> c = {};
      |            ^
crash.cpp:5:22: internal compiler error: tree check: expected function_decl,
have template_decl in implicitly_declare_fn, at cp/method.cc:3313
    5 |   using SpanImpl<T>::SpanImpl;
      |                      ^~~~~~~~

  parent reply	other threads:[~2024-04-19 22:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-19 20:05 [Bug ipa/114784] New: " dani at danielbertalan dot dev
2024-04-19 20:08 ` [Bug ipa/114784] " dani at danielbertalan dot dev
2024-04-19 20:21 ` jakub at gcc dot gnu.org
2024-04-19 20:42 ` jakub at gcc dot gnu.org
2024-04-19 21:07 ` jakub at gcc dot gnu.org
2024-04-19 22:00 ` dani at danielbertalan dot dev [this message]
2024-04-22 11:14 ` jakub at gcc dot gnu.org
2024-04-23  6:39 ` cvs-commit at gcc dot gnu.org
2024-04-23  6:40 ` jakub 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-114784-4-VOYeTknAZR@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).