public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/96442] New: ICE in tree check: expected integer_type or enumeral_type or boolean_type or real_type or fixed_point_type, have record_type in int_fits_type_p, at tree.c:8954
@ 2020-08-03 17:09 haoxintu at gmail dot com
  2020-08-03 19:26 ` [Bug c++/96442] [9/10/11 Regression] " mpolacek at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: haoxintu at gmail dot com @ 2020-08-03 17:09 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96442
           Summary: ICE in tree check: expected integer_type or
                    enumeral_type or boolean_type or real_type or
                    fixed_point_type, have record_type in int_fits_type_p,
                    at tree.c:8954
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: error-recovery, 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 code, reduced by C-Vise, makes GCC-trunk ICE and makes released GCC
versions "confused by early errors".

Input:
//small.cc
enum struct a : struct {};
template <class b> enum class a : class c{};
enum struct a {b};

Command:
g++ small.cc

Output:
small.cc:1:25: error: underlying type ‘<unnamed struct>’ of ‘a’ must be an
integral type
    1 | enum struct a : struct {};
      |                         ^
small.cc:3:13: error: different underlying type in enum ‘enum class a’
    3 | enum struct a {b};
      |             ^
small.cc:1:25: note: previous definition here
    1 | enum struct a : struct {};
      |                         ^
small.cc:3:16: internal compiler error: tree check: expected integer_type or
enumeral_type or boolean_type or real_type or fixed_point_type, have
record_type in int_fits_type_p, at tree.c:8954
    3 | enum struct a {b};
      |                ^
0x7c7fd7 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/tree.c:9687
0x7ceec0 tree_check5(tree_node const*, char const*, int, char const*,
tree_code, tree_code, tree_code, tree_code, tree_code)
        ../../gcc/tree.h:3650
0x7ceec0 int_fits_type_p(tree_node const*, tree_node const*)
        ../../gcc/tree.c:8954
0x919b9a build_enumerator(tree_node*, tree_node*, tree_node*, tree_node*,
unsigned int)
        ../../gcc/cp/decl.c:15906
0x9aafec cp_parser_enumerator_definition
        ../../gcc/cp/parser.c:19585
0x9aafec cp_parser_enumerator_list
        ../../gcc/cp/parser.c:19514
0x9aafec cp_parser_enum_specifier
        ../../gcc/cp/parser.c:19444
0x9aafec cp_parser_type_specifier
        ../../gcc/cp/parser.c:17769
0x9ab50e cp_parser_decl_specifier_seq
        ../../gcc/cp/parser.c:14436
0x9ac2c1 cp_parser_simple_declaration
        ../../gcc/cp/parser.c:13690
0x9d763e cp_parser_declaration
        ../../gcc/cp/parser.c:13510
0x9d7d2b cp_parser_translation_unit
        ../../gcc/cp/parser.c:4793
0x9d7d2b c_parse_file()
        ../../gcc/cp/parser.c:44081
0xaf2e9d 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.

My gcc version is
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/home/haoxin/corpus-compilers/gcc-trunk/gcc-master/build/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure
--prefix=/home/haoxin/corpus-compilers/gcc-trunk/gcc-master/build/
--enable-languages=c,c++ CC=gcc CXX=g++
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20200801 (experimental) (GCC) 

Thanks,
Haoxin

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

end of thread, other threads:[~2022-06-08 20:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-03 17:09 [Bug c++/96442] New: ICE in tree check: expected integer_type or enumeral_type or boolean_type or real_type or fixed_point_type, have record_type in int_fits_type_p, at tree.c:8954 haoxintu at gmail dot com
2020-08-03 19:26 ` [Bug c++/96442] [9/10/11 Regression] " mpolacek at gcc dot gnu.org
2020-08-04  6:01 ` rguenth at gcc dot gnu.org
2021-06-01  8:18 ` [Bug c++/96442] [9/10/11/12 " rguenth at gcc dot gnu.org
2021-08-08  9:07 ` pinskia at gcc dot gnu.org
2022-02-22 12:22 ` roger at nextmovesoftware dot com
2022-05-27  9:43 ` [Bug c++/96442] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-07  6:57 ` cvs-commit at gcc dot gnu.org
2022-06-08 20:12 ` roger at nextmovesoftware dot com

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