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

            Bug ID: 120662
           Summary: ICE: Segmentation fault in
                    wrapup_global_declaration_2(tree_node*)
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: ice-checking, ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rush102333 at gmail dot com
  Target Milestone: ---

$cat 461.cpp
template<typename T> struct As { operator T(); 
        static constexpr auto value = T::someValue;
};
template<typename ...T> struct AsAll : As<T>... {
  using As<T>::operator T...;

        static constexpr auto value = T::someValue;
};
AsAll<int, float, char> x;


$g++ -fsyntax-only 461.cpp
<source>:9:26: internal compiler error: Segmentation fault
    9 | AsAll<int, float, char> x;
      | 
0x2833015 diagnostic_context::diagnostic_impl(rich_location*,
diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag
(*) [1], diagnostic_t)
        ???:0
0x28547a6 internal_error(char const*, ...)
        ???:0
0x14b6fa5 wrapup_global_declaration_2(tree_node*)
        ???:0
0x14b70eb wrapup_global_declarations(tree_node**, int)
        ???:0
0xbeecf0 c_parse_final_cleanups()
        ???:0
0xe6db88 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.


Please see https://godbolt.org/z/Td7h4zGjK

Reply via email to