public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "haoxintu at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96380] New: [10/11 Regression] ICE in tree check: expected integer_cst, have view_convert_expr in get_len, at tree.h:5954 Date: Wed, 29 Jul 2020 16:50:12 +0000 [thread overview] Message-ID: <bug-96380-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96380 Bug ID: 96380 Summary: [10/11 Regression] ICE in tree check: expected integer_cst, have view_convert_expr in get_len, at tree.h:5954 Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This invalid code makes GCC-trunk and GCC-10.2 ICE, and GCC-10 downwards versions compile it well without ICE. Input: //small.cc const int a; const long b; enum struct c; template <class> enum struct c : union enum class c { e = b, f = a }; enum class c {}; Command: g++ -fermissive -w small.cc Output: small.cc:5:15: internal compiler error: tree check: expected integer_cst, have view_convert_expr in get_len, at tree.h:5954 5 | enum class c {}; | ^ 0x7eb991 tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/tree.c:9687 0x8aeffa tree_check(tree_node const*, char const*, int, char const*, tree_code) ../../gcc/tree.h:3559 0x8aeffa wi::extended_tree<192>::get_len() const ../../gcc/tree.h:5954 0x8aeffa wi::int_traits<generic_wide_int<wi::extended_tree<192> > >::decompose(long*, unsigned int, generic_wide_int<wi::extended_tree<192> > const&) ../../gcc/wide-int.h:985 0x8aeffa wide_int_ref_storage<true, false>::wide_int_ref_storage<generic_wide_int<wi::extended_tree<192> > >(generic_wide_int<wi::extended_tree<192> > const&, unsigned int) ../../gcc/wide-int.h:1034 0x8aeffa generic_wide_int<wide_int_ref_storage<true, false> >::generic_wide_int<generic_wide_int<wi::extended_tree<192> > >(generic_wide_int<wi::extended_tree<192> > const&, unsigned int) ../../gcc/wide-int.h:790 0x8aeffa bool wi::lts_p<generic_wide_int<wi::extended_tree<192> >, generic_wide_int<wi::extended_tree<192> > >(generic_wide_int<wi::extended_tree<192> > const&, generic_wide_int<wi::extended_tree<192> > const&) ../../gcc/wide-int.h:1901 0x93bc08 wi::binary_traits<generic_wide_int<wi::extended_tree<192> >, generic_wide_int<wi::extended_tree<192> >, wi::int_traits<generic_wide_int<wi::extended_tree<192> > >::precision_type, wi::int_traits<generic_wide_int<wi::extended_tree<192> > >::precision_type>::signed_predicate_result operator< <generic_wide_int<wi::extended_tree<192> >, generic_wide_int<wi::extended_tree<192> > >(generic_wide_int<wi::extended_tree<192> > const&, generic_wide_int<wi::extended_tree<192> > const&) ../../gcc/wide-int.h:3248 0x93bc08 tree_int_cst_lt(tree_node const*, tree_node const*) ../../gcc/tree.h:6110 0x93bc08 finish_enum_value_list(tree_node*) ../../gcc/cp/decl.c:15573 0x9cc89b cp_parser_enum_specifier ../../gcc/cp/parser.c:19483 0x9cc89b cp_parser_type_specifier ../../gcc/cp/parser.c:17769 0x9cd17e cp_parser_decl_specifier_seq ../../gcc/cp/parser.c:14436 0x9cdf31 cp_parser_simple_declaration ../../gcc/cp/parser.c:13690 0x9f929e cp_parser_declaration ../../gcc/cp/parser.c:13510 0x9f998b cp_parser_translation_unit ../../gcc/cp/parser.c:4793 0x9f998b c_parse_file() ../../gcc/cp/parser.c:44081 0xb144fd c_common_parse_file() ../../gcc/c-family/c-opts.c:1188 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. Reproduced in Godbolt : https://godbolt.org/z/YGPxsj Thanks, Haoxin
next reply other threads:[~2020-07-29 16:50 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-29 16:50 haoxintu at gmail dot com [this message] 2020-07-30 6:05 ` [Bug c++/96380] " rguenth at gcc dot gnu.org 2020-07-30 7:41 ` marxin at gcc dot gnu.org 2020-07-30 7:41 ` marxin at gcc dot gnu.org 2020-07-30 15:10 ` mpolacek at gcc dot gnu.org 2020-10-12 12:40 ` rguenth at gcc dot gnu.org 2021-03-29 16:54 ` jakub at gcc dot gnu.org 2021-03-29 17:04 ` mpolacek at gcc dot gnu.org 2021-04-08 12:02 ` rguenth at gcc dot gnu.org 2021-04-20 16:17 ` mpolacek at gcc dot gnu.org 2021-04-20 19:38 ` [Bug c++/96380] [10/11/12 " mpolacek at gcc dot gnu.org 2021-04-21 15:12 ` cvs-commit at gcc dot gnu.org 2021-04-21 15:14 ` [Bug c++/96380] [10/11 " mpolacek at gcc dot gnu.org 2021-04-27 16:41 ` cvs-commit at gcc dot gnu.org 2021-12-02 13:29 ` [Bug c++/96380] [10 " mpolacek 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-96380-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: linkBe 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).