public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105787] New: internal compiler error: tree check: expected enumeral_type, have record_type in tsubst_copy
@ 2022-05-31  8:25 tamas+gcc@hudson-trading.com
  2022-05-31 13:07 ` [Bug c++/105787] " mpolacek at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: tamas+gcc@hudson-trading.com @ 2022-05-31  8:25 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105787
           Summary: internal compiler error: tree check: expected
                    enumeral_type, have record_type in tsubst_copy
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tamas+gcc@hudson-trading.com
  Target Milestone: ---

The following code causes ICE (at least) on gcc 11.2, 11.3, 12.0 and 13.0.0
20220529 (experimental) when compiling with -std=c++20:

template <typename> class a;
class b;
template <> class a<b> {
public:
  enum class c { d };
  using enum c;
};
class b : public a<b> {};
template <int> class e { char g = (char)b::d; };
e<0> f;

Full error from "13.0.0 20220529":

<source>: In instantiation of 'constexpr e<0>::e()':
<source>:10:6:   required from here
<source>:9:44: internal compiler error: tree check: expected enumeral_type,
have record_type in tsubst_copy, at cp/pt.cc:16944
    9 | template <int> class e { char g = (char)b::d; };
      |                                         ~~~^
0x2200a89 internal_error(char const*, ...)
        ???:0
0x6fa097 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ???:0
0x9c2aea tsubst_tree_list(tree_node*, tree_node*, int, tree_node*)
        ???:0
0x89984c get_nsdmi(tree_node*, bool, int)
        ???:0
0x8cd522 get_defaulted_eh_spec(tree_node*, int)
        ???:0
0x9c2108 maybe_instantiate_noexcept(tree_node*, int)
        ???:0
0x9c2093 maybe_instantiate_noexcept(tree_node*, int)
        ???:0
0x867369 mark_used(tree_node*, int)
        ???:0
0x776f5f build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, tree_node*, int, tree_node**, int)
        ???:0
0x778c48 build_special_member_call(tree_node*, tree_node*, vec<tree_node*,
va_gc, vl_embed>**, tree_node*, int, int)
        ???:0
0x8947ad build_aggr_init(tree_node*, tree_node*, int, int)
        ???:0
0x850c86 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        ???:0
0x98cded c_parse_file()
        ???:0
0xb22051 c_common_parse_file()
        ???:0
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.

Godbolt link: https://godbolt.org/z/xcTTs3s3e

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

end of thread, other threads:[~2022-10-30 18:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-31  8:25 [Bug c++/105787] New: internal compiler error: tree check: expected enumeral_type, have record_type in tsubst_copy tamas+gcc@hudson-trading.com
2022-05-31 13:07 ` [Bug c++/105787] " mpolacek at gcc dot gnu.org
2022-07-25 14:55 ` [Bug c++/105787] [10/11/12/13 Regression] ICE in tree check: expected enumeral_type, have record_type in tsubst_copy since r11-5003-gd50310408f54e3 rguenth at gcc dot gnu.org
2022-07-25 16:13 ` [Bug c++/105787] " rguenth at gcc dot gnu.org
2022-10-30 18:53 ` pinskia at gcc dot gnu.org
2022-10-30 18:54 ` pinskia 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).