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

--- Comment #2 from Boning Chen <berningchen at gmail dot com> ---
Secondary simplification:

#include <meta>
struct TestStruct
{
    struct
    {
        int b;
    } a[4];
};

template <std::meta::info type> struct TemplateSturct
{
    constexpr static int Error = 0;
};

int main()
{
   
TemplateSturct<^^std::remove_extent_t<typename[:std::meta::type_of(^^TestStruct::a):]>>::;
}

Output:
<source>: In function 'int main()':
<source>:17:94: error: expected unqualified-id before ';' token
   17 |    
TemplateSturct<^^std::remove_extent_t<typename[:std::meta::type_of(^^TestStruct::a):]>>::;
      |                                                                        
                     ^
<source>: At global scope:
<source>:12:26: internal compiler error: in write_compact_number, at
cp/mangle.cc:1788
   12 |     constexpr static int Error = 0;
      |                          ^~~~~
0x29f7b88 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
        ???:0
0x29ec7cb internal_error(char const*, ...)
        ???:0
0xb34382 fancy_abort(char const*, int, char const*)
        ???:0
0xca1069 mangle_decl(tree_node*)
        ???:0
0x18fc585 decl_assembler_name(tree_node*)
        ???:0
0xff1546 symbol_table::finalize_compilation_unit()
        ???:0

Reply via email to