https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92864
Bug ID: 92864 Summary: [10 Regression] ICE in is_really_empty_class at gcc/cp/class.c:8595 since r276563 Product: gcc Version: 10.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: jakub at gcc dot gnu.org Target Milestone: --- I see the following ICE: $ cat ice.ii namespace std { class type_info {}; } // namespace std void fn1() { !((void **)&typeid(short))[0]; } $ g++ ice.ii -c ice.ii: In function ‘void fn1()’: ice.ii:4:42: internal compiler error: Segmentation fault 4 | void fn1() { !((void **)&typeid(short))[0]; } | ^ 0x10370ef crash_signal /home/marxin/Programming/gcc/gcc/toplev.c:328 0x7ff2d3a2814f ??? /usr/src/debug/glibc-2.30-1.3.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 0x91531b tree_check(tree_node*, char const*, int, char const*, tree_code) /home/marxin/Programming/gcc/gcc/tree.h:3272 0x91531b is_really_empty_class(tree_node*, bool) /home/marxin/Programming/gcc/gcc/cp/class.c:8595 0x92df9d cxx_eval_constant_expression /home/marxin/Programming/gcc/gcc/cp/constexpr.c:4919 0x9390af cxx_eval_component_reference /home/marxin/Programming/gcc/gcc/cp/constexpr.c:2995 0x92f595 cxx_eval_constant_expression /home/marxin/Programming/gcc/gcc/cp/constexpr.c:5374 0x9390af cxx_eval_component_reference /home/marxin/Programming/gcc/gcc/cp/constexpr.c:2995 0x92f595 cxx_eval_constant_expression /home/marxin/Programming/gcc/gcc/cp/constexpr.c:5374 0x93831b cxx_eval_indirect_ref /home/marxin/Programming/gcc/gcc/cp/constexpr.c:3825 0x92dbf9 cxx_eval_constant_expression /home/marxin/Programming/gcc/gcc/cp/constexpr.c:5200 0x93106b cxx_eval_outermost_constant_expr /home/marxin/Programming/gcc/gcc/cp/constexpr.c:5977 0x935f5b maybe_constant_value(tree_node*, tree_node*, bool) /home/marxin/Programming/gcc/gcc/cp/constexpr.c:6254 0x950e85 cp_fully_fold(tree_node*) /home/marxin/Programming/gcc/gcc/cp/cp-gimplify.c:2272 0xae096a cp_build_binary_op(op_location_t const&, tree_code, tree_node*, tree_node*, int) /home/marxin/Programming/gcc/gcc/cp/typeck.c:5682 0xae41aa cp_truthvalue_conversion(tree_node*, int) /home/marxin/Programming/gcc/gcc/cp/typeck.c:6019 0x9568ab ocp_convert(tree_node*, tree_node*, int, int, int) /home/marxin/Programming/gcc/gcc/cp/cvt.c:852 0x957efd cp_convert(tree_node*, tree_node*, int) /home/marxin/Programming/gcc/gcc/cp/cvt.c:637 0x957efd cp_convert_and_check(tree_node*, tree_node*, int) /home/marxin/Programming/gcc/gcc/cp/cvt.c:656 0x8f9b03 convert_like_real /home/marxin/Programming/gcc/gcc/cp/call.c:7784 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.