public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/107864] [10/11/12/13 Regression] ICE (seg fault) in check_return_expr or instantiate_body with concepts and specialized version
Date: Thu, 24 Nov 2022 21:55:24 +0000	[thread overview]
Message-ID: <bug-107864-4-de4vrdWJcE@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107864-4@http.gcc.gnu.org/bugzilla/>

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[10/11/12/13 Regression]    |[10/11/12/13 Regression]
                   |ICE (seg fault) in          |ICE (seg fault) in
                   |check_return_expr with      |check_return_expr or
                   |concepts and specialized    |instantiate_body with
                   |version                     |concepts and specialized
                   |                            |version

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note without the concept there, GCC does not ICE.

Note changing it slightly (remove the if return type):
template<class T>
void j( T const& val ) requires true {}
template<> void j( int const& val ) { }
void g() {
  j(1);
}
--- CUT ---
Gives a different ICE:
t.cc: In instantiation of ‘void j(const T&) requires  true [with T = int]’:
t.cc:5:4:   required from here
t.cc:2:39: internal compiler error: Segmentation fault
    2 | void j( T const& val ) requires true {}
      |                                       ^
0x120e72f crash_signal
        /home/apinski/src/upstream-gcc/gcc/gcc/toplev.cc:314
0xbd42d1 instantiate_body
        /home/apinski/src/upstream-gcc/gcc/gcc/cp/pt.cc:26494
0xbd52ba instantiate_decl(tree_node*, bool, bool)
        /home/apinski/src/upstream-gcc/gcc/gcc/cp/pt.cc:26774
0xbf2b2b instantiate_pending_templates(int)
        /home/apinski/src/upstream-gcc/gcc/gcc/cp/pt.cc:26852
0xaaa7fb c_parse_final_cleanups()
        /home/apinski/src/upstream-gcc/gcc/gcc/cp/decl2.cc:4940
0xcd38b0 c_common_parse_file()
        /home/apinski/src/upstream-gcc/gcc/gcc/c-family/c-opts.cc:1266
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

  parent reply	other threads:[~2022-11-24 21:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-24 19:17 [Bug c++/107864] New: Internal Compiler Error (Large Project, C++20) ian at geometrian dot com
2022-11-24 19:38 ` [Bug c++/107864] " pinskia at gcc dot gnu.org
2022-11-24 21:40 ` pinskia at gcc dot gnu.org
2022-11-24 21:42 ` pinskia at gcc dot gnu.org
2022-11-24 21:48 ` pinskia at gcc dot gnu.org
2022-11-24 21:51 ` [Bug c++/107864] [10/11/12/13 Regression] ICE (seg fault) in check_return_expr with concepts and specialized version pinskia at gcc dot gnu.org
2022-11-24 21:55 ` pinskia at gcc dot gnu.org [this message]
2022-11-25  0:11 ` [Bug c++/107864] [10/11/12/13 Regression] ICE (seg fault) in check_return_expr or instantiate_body " redi at gcc dot gnu.org
2022-11-28 16:23 ` ppalka at gcc dot gnu.org
2022-11-29 14:55 ` cvs-commit at gcc dot gnu.org
2022-11-29 15:06 ` [Bug c++/107864] [10/11/12 " ppalka at gcc dot gnu.org
2023-03-07  2:18 ` cvs-commit at gcc dot gnu.org
2023-05-22  3:12 ` [Bug c++/107864] [10/11 " cvs-commit at gcc dot gnu.org
2023-07-07 10:04 ` [Bug c++/107864] [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-107864-4-de4vrdWJcE@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).