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++/108206] New: ICE: tree check: expected tree that contains 'decl minimal' structure, have 'error_mark' in merge_default_template_args, at cp/decl.cc:1563
Date: Fri, 23 Dec 2022 06:51:24 +0000	[thread overview]
Message-ID: <bug-108206-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 108206
           Summary: ICE: tree check: expected tree that contains 'decl
                    minimal' structure, have 'error_mark' in
                    merge_default_template_args, at cp/decl.cc:1563
           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: ---

gcc 13.0.0 20221218 snapshot (g:fd69977febf399d1992bbf8d66ae9170e0a4dc9f) ICEs
when compiling the following testcase:

template <WrongType _IsMove, typename T1> void foo (T1);
template <WrongType _IsMove, typename T2> void foo (T2);

% g++-13 -c vph5xonf.cc
vph5xonf.cc:1:11: error: 'WrongType' has not been declared
    1 | template <WrongType _IsMove, typename T1> void foo (T1);
      |           ^~~~~~~~~
vph5xonf.cc:2:11: error: 'WrongType' has not been declared
    2 | template <WrongType _IsMove, typename T2> void bar (T2);
      |           ^~~~~~~~~
zsh: exit 1     g++-13 -c vph5xonf.cc
asolokha@czc101b91d ~/t1 % g++-13 -c vph5xonf.cc
vph5xonf.cc:1:11: error: 'WrongType' has not been declared
    1 | template <WrongType _IsMove, typename T1> void foo (T1);
      |           ^~~~~~~~~
vph5xonf.cc:2:11: error: 'WrongType' has not been declared
    2 | template <WrongType _IsMove, typename T2> void foo (T2);
      |           ^~~~~~~~~
vph5xonf.cc:2:55: error: redefinition of default argument for '<declaration
error>'
    2 | template <WrongType _IsMove, typename T2> void foo (T2);
      |                                                       ^
vph5xonf.cc:2:55: internal compiler error: tree check: expected tree that
contains 'decl minimal' structure, have 'error_mark' in
merge_default_template_args, at cp/decl.cc:1563
0x88468e tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221218/work/gcc-13-20221218/gcc/tree.cc:8996
0x6d185d contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221218/work/gcc-13-20221218/gcc/tree.h:3642
0x6d185d merge_default_template_args(tree_node*, tree_node*, bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221218/work/gcc-13-20221218/gcc/cp/decl.cc:1563
0x9ff720 duplicate_decls(tree_node*, tree_node*, bool, bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221218/work/gcc-13-20221218/gcc/cp/decl.cc:2371
0xabdd4c pushdecl(tree_node*, bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221218/work/gcc-13-20221218/gcc/cp/name-lookup.cc:3686
0xabf011 do_pushdecl_with_scope
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221218/work/gcc-13-20221218/gcc/cp/name-lookup.cc:4769
0xabf23b pushdecl_namespace_level(tree_node*, bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221218/work/gcc-13-20221218/gcc/cp/name-lookup.cc:6125
0xb70268 push_template_decl(tree_node*, bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221218/work/gcc-13-20221218/gcc/cp/pt.cc:6128
0xa0d399 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221218/work/gcc-13-20221218/gcc/cp/decl.cc:5908
0xb10835 cp_parser_init_declarator
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221218/work/gcc-13-20221218/gcc/cp/parser.cc:22854
0xb18d5e cp_parser_single_declaration
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221218/work/gcc-13-20221218/gcc/cp/parser.cc:32459
0xb18f4c cp_parser_template_declaration_after_parameters
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221218/work/gcc-13-20221218/gcc/cp/parser.cc:32012
0xb19860 cp_parser_explicit_template_declaration
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221218/work/gcc-13-20221218/gcc/cp/parser.cc:32285
0xb1c504 cp_parser_declaration
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221218/work/gcc-13-20221218/gcc/cp/parser.cc:14959
0xb1d051 cp_parser_toplevel_declaration
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221218/work/gcc-13-20221218/gcc/cp/parser.cc:15051
0xb1d051 cp_parser_translation_unit
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221218/work/gcc-13-20221218/gcc/cp/parser.cc:5090
0xb1d051 c_parse_file()
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221218/work/gcc-13-20221218/gcc/cp/parser.cc:49389
0xc5d681 c_common_parse_file()
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221218/work/gcc-13-20221218/gcc/c-family/c-opts.cc:1248

             reply	other threads:[~2022-12-23  6:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-23  6:51 asolokha at gmx dot com [this message]
2022-12-23  6:52 ` [Bug c++/108206] " asolokha at gmx dot com
2022-12-23  8:53 ` [Bug c++/108206] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'error_mark' in merge_default_template_args, at cp/decl.cc:1563 since r12-7562-gfe548eb8436f3906 marxin at gcc dot gnu.org
2022-12-24 20:33 ` [Bug c++/108206] [12/13 Regression] " pinskia at gcc dot gnu.org
2023-01-03 17:16 ` jakub at gcc dot gnu.org
2023-01-04 17:43 ` cvs-commit at gcc dot gnu.org
2023-01-04 17:44 ` [Bug c++/108206] [12 " jakub at gcc dot gnu.org
2023-01-09 13:25 ` rguenth at gcc dot gnu.org
2023-02-10 17:45 ` cvs-commit at gcc dot gnu.org
2023-02-10 17:59 ` 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-108206-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).