https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108613
Bug ID: 108613 Summary: GCC12 internal compiler error on __int128_t in type_traits header Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mserdarsanli at gmail dot com Target Milestone: --- https://godbolt.org/z/M1o34e6cx Below code crashes GCC versions starting with GCC 12. It is only stuff from std library headers, I've copied bits from preprocessed output. template< class > struct remove_cv; template< class _Tp> using __remove_cv_t = typename remove_cv< _Tp> ::type; template< class _Tp, _Tp __v> struct integral_constant { static constexpr inline _Tp value = (__v); typedef _Tp value_type; typedef integral_constant type; constexpr operator value_type() const noexcept { return value; } constexpr value_type operator()() const noexcept { return value; } }; using false_type = integral_constant< bool, false> ; template< class ...> struct __or_; template<> struct __or_< > : public false_type {}; template< class , class > struct is_same; template< class _Tp, class ..._Types> using __is_one_of = __or_< is_same< _Tp, _Types> ...> ; template< class _Tp> using __is_signed_integer = __is_one_of< _Tp , signed char, signed short, signed int, signed long, signed long long, signed __int128_t> ; ----------- Stacktrace: 0xe2534f crash_signal /root/source/gcc-12.2.0/gcc/toplev.cc:322 0x7c0535 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*, decl_context, int, tree_node**) /root/source/gcc-12.2.0/gcc/cp/decl.cc:12373 0x7c73fc groktypename(cp_decl_specifier_seq*, cp_declarator const*, bool) /root/source/gcc-12.2.0/gcc/cp/decl.cc:5514 0x8797d5 cp_parser_type_id_1 /root/source/gcc-12.2.0/gcc/cp/parser.cc:24250 0x87c4f3 cp_parser_template_type_arg /root/source/gcc-12.2.0/gcc/cp/parser.cc:24272 0x87c659 cp_parser_template_argument /root/source/gcc-12.2.0/gcc/cp/parser.cc:18803 0x87c659 cp_parser_template_argument_list /root/source/gcc-12.2.0/gcc/cp/parser.cc:18727 0x87c659 cp_parser_enclosed_template_argument_list /root/source/gcc-12.2.0/gcc/cp/parser.cc:32059 0x87da7f cp_parser_template_id /root/source/gcc-12.2.0/gcc/cp/parser.cc:18266 0x87e239 cp_parser_class_name /root/source/gcc-12.2.0/gcc/cp/parser.cc:25713 0x875d8e cp_parser_qualifying_entity /root/source/gcc-12.2.0/gcc/cp/parser.cc:7116 0x875d8e cp_parser_nested_name_specifier_opt /root/source/gcc-12.2.0/gcc/cp/parser.cc:6798 0x88cf6c cp_parser_simple_type_specifier /root/source/gcc-12.2.0/gcc/cp/parser.cc:19765 0x86aea5 cp_parser_type_specifier /root/source/gcc-12.2.0/gcc/cp/parser.cc:19424 0x87b3d0 cp_parser_type_specifier_seq /root/source/gcc-12.2.0/gcc/cp/parser.cc:24364 0x879744 cp_parser_type_id_1 /root/source/gcc-12.2.0/gcc/cp/parser.cc:24164 0x87c117 cp_parser_type_id /root/source/gcc-12.2.0/gcc/cp/parser.cc:24260 0x87c117 cp_parser_alias_declaration /root/source/gcc-12.2.0/gcc/cp/parser.cc:21778 0x897f37 cp_parser_template_declaration_after_parameters /root/source/gcc-12.2.0/gcc/cp/parser.cc:31316 0x89827a cp_parser_explicit_template_declaration /root/source/gcc-12.2.0/gcc/cp/parser.cc:31598