public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "asolokha at gmx dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/107150] New: ICE: tree check: expected function_type or method_type, have lang_type in deduce_noexcept_on_destructor, at cp/class.cc:5183
Date: Tue, 04 Oct 2022 10:50:09 +0000	[thread overview]
Message-ID: <bug-107150-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 107150
           Summary: ICE: tree check: expected function_type or
                    method_type, have lang_type in
                    deduce_noexcept_on_destructor, at cp/class.cc:5183
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

g++ 13.0.0 20220925 snapshot (g:77bbf69d2981dafc2ef3e59bfbefb645d88bab9d) ICEs
when compiling the following testcase, reduced from
clang/testsuite/CXX/class/class.dtor/p4.cpp from the clang 15.0.1 test suite:

template <int N>
struct D {
  ~D() requires(N != 0) = delete;
  ~D() requires(N == 1) = delete;
};

template struct D<0>;

% g++-13.0.0 -fconcepts -c ghba8ll9.cpp
ghba8ll9.cpp: In instantiation of 'struct D<0>':
ghba8ll9.cpp:7:17:   required from here
ghba8ll9.cpp:2:8: internal compiler error: tree check: expected function_type
or method_type, have lang_type in deduce_noexcept_on_destructor, at
cp/class.cc:5183
    2 | struct D {
      |        ^
0x891780 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/tree.cc:8827
0x690b3a tree_check2(tree_node*, char const*, int, char const*, tree_code,
tree_code)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/tree.h:3539
0x690b3a deduce_noexcept_on_destructor(tree_node*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp/class.cc:5183
0x99d6c9 check_bases_and_members
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp/class.cc:6045
0x9a150b finish_struct_1(tree_node*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp/class.cc:7492
0xb8ead0 instantiate_class_template(tree_node*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp/pt.cc:12468
0xbe5c28 complete_type(tree_node*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp/typeck.cc:138
0xb850ca do_type_instantiation(tree_node*, tree_node*, int)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp/pt.cc:26074
0xb1ea7f cp_parser_explicit_instantiation
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp/parser.cc:19262
0xb308ac cp_parser_declaration
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp/parser.cc:15075
0xb31509 cp_parser_toplevel_declaration
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp/parser.cc:15130
0xb31509 cp_parser_translation_unit
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp/parser.cc:5068
0xb31509 c_parse_file()
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp/parser.cc:48606
0xc6e3a1 c_common_parse_file()
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/c-family/c-opts.cc:1255

g++ 12 and earlier releases ICE with a splat identical to the one reported in
PR96745. I'm not sure if this PR is a duplicate of that earlier one.

             reply	other threads:[~2022-10-04 10:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-04 10:50 asolokha at gmx dot com [this message]
2022-10-04 11:01 ` [Bug c++/107150] " marxin at gcc dot gnu.org
2023-02-03 14:23 ` ppalka 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-107150-4@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).