public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106311] New: internal compiler error in redeclare_class_template
@ 2022-07-15  0:05 mpolacek at gcc dot gnu.org
  2022-07-15  0:06 ` [Bug c++/106311] [12/13 Regression] " mpolacek at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2022-07-15  0:05 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106311
           Summary: internal compiler error in redeclare_class_template
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

Found while reducing bug 106309.

template <typename, long> struct array;
template <typename, size_t X> struct array { };

$ ./cc1plus -quiet p.C
p.C:2:21: error: ‘size_t’ has not been declared
    2 | template <typename, size_t X> struct array { };
      |                     ^~~~~~
p.C:1:21: error: template parameter ‘long int <anonymous>’
    1 | template <typename, long> struct array;
      |                     ^~~~
p.C:2:38: internal compiler error: tree check: expected tree that contains
‘decl minimal’ structure, have ‘error_mark’ in redeclare_class_template, at
cp/pt.cc:6380
    2 | template <typename, size_t X> struct array { };
      |                                      ^~~~~
0x1bcc50c tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
        /home/mpolacek/src/gcc/gcc/tree.cc:8991
0xb06dc6 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        /home/mpolacek/src/gcc/gcc/tree.h:3622
0xe136e1 redeclare_class_template(tree_node*, tree_node*, tree_node*)
        /home/mpolacek/src/gcc/gcc/cp/pt.cc:6380
0xc40a20 xref_tag(tag_types, tree_node*, TAG_how, bool)
        /home/mpolacek/src/gcc/gcc/cp/decl.cc:15869
0xdaafdd cp_parser_class_head
        /home/mpolacek/src/gcc/gcc/cp/parser.cc:26785

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-26 13:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-15  0:05 [Bug c++/106311] New: internal compiler error in redeclare_class_template mpolacek at gcc dot gnu.org
2022-07-15  0:06 ` [Bug c++/106311] [12/13 Regression] " mpolacek at gcc dot gnu.org
2022-07-26 12:04 ` cvs-commit at gcc dot gnu.org
2022-07-26 13:22 ` cvs-commit at gcc dot gnu.org
2022-07-26 13:24 ` mpolacek at gcc dot gnu.org

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).