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

            Bug ID: 88785
           Summary: ICE in as_a, at machmode.h:353
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kretz at kde dot org
  Target Milestone: ---

Created attachment 45398
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45398&action=edit
reduced test case

Compile the attached test case with `-g -O2 -std=gnu++17 -march=skylake-avx512
-c`:

during RTL pass: final
ice.cpp: In function ‘void dg() [with dc = a::b<long int>]’:
ice.cpp:192:1: internal compiler error: in as_a, at machmode.h:353
  192 | }
      | ^
0x6d31e4 scalar_float_mode as_a<scalar_float_mode>(machine_mode)
        ../../gcc/machmode.h:353
0x6d31e4 insert_float
        ../../gcc/dwarf2out.c:19456
0xbbc38e add_const_value_attribute
        ../../gcc/dwarf2out.c:19548
0xbbd9a3 add_location_or_const_value_attribute
        ../../gcc/dwarf2out.c:20106
0xbbd9a3 add_location_or_const_value_attribute
        ../../gcc/dwarf2out.c:20060
0xbd000a gen_variable_die
        ../../gcc/dwarf2out.c:23880
0xbc4348 gen_decl_die
        ../../gcc/dwarf2out.c:26371
0xbc14cf decls_for_scope
        ../../gcc/dwarf2out.c:25858
0xbddff6 gen_inlined_subroutine_die
        ../../gcc/dwarf2out.c:24219
0xbddff6 gen_block_die
        ../../gcc/dwarf2out.c:25762
0xbc158a decls_for_scope
        ../../gcc/dwarf2out.c:25887
0xbddff6 gen_inlined_subroutine_die
        ../../gcc/dwarf2out.c:24219
0xbddff6 gen_block_die
        ../../gcc/dwarf2out.c:25762
0xbc158a decls_for_scope
        ../../gcc/dwarf2out.c:25887
0xbc252f gen_subprogram_die
        ../../gcc/dwarf2out.c:23328
0xbc3f9c gen_decl_die
        ../../gcc/dwarf2out.c:26288
0xbc4b3e dwarf2out_decl
        ../../gcc/dwarf2out.c:26856
0xbc4fbe dwarf2out_function_decl
        ../../gcc/dwarf2out.c:26871
0xc390bc rest_of_handle_final
        ../../gcc/final.c:4695
0xc390bc execute
        ../../gcc/final.c:4737

Reply via email to