https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105408
Bug ID: 105408 Summary: ICE in output_constructor_regular_field, at varasm.cc:5515 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: modula2 Assignee: gaius at gcc dot gnu.org Reporter: ro at gcc dot gnu.org Target Milestone: --- Target: sparcv9-sun-solaris2.11 When targetting 64-bit Solaris/SPARC, the bootstrap finishes successfully (unlike 32-bit, cf. PR modula2/105392) and 64-bit gm2 testresults are reasonable: === gm2 Summary for unix === # of expected passes 11721 # of unexpected failures 7 # of unresolved testcases 1 However, 32-bit testresults show 2000+ of the same ICE: FAIL: gm2/calling-c/datatypes/unbounded/run/pass/m.mod compilation, -O (internal compiler error: ^[[m^[[Kin simplify_subreg, at simplify-rtx.cc:7351) during RTL pass: final /var/gcc/gcc-12.0.1-20220424/11.4-gm2-64/sparcv9-sun-solaris2.11/./libgm2/libm2iso/SYSTEM.def: In function '_M2_testgeneric_init': /var/gcc/gcc-12.0.1-20220424/11.4-gm2-64/sparcv9-sun-solaris2.11/./libgm2/libm2iso/SYSTEM.def:12:12: internal compiler error: in output_constructor_regular_field, at varasm.cc:5515 0x101302957 output_constructor_regular_field /vol/gcc/src/hg/master/modula-2/gcc/varasm.cc:5515 0x101302957 output_constructor /vol/gcc/src/hg/master/modula-2/gcc/varasm.cc:5827 0x101303e5b assemble_constant_contents /vol/gcc/src/hg/master/modula-2/gcc/varasm.cc:3642 0x101305e57 output_constant_def_contents /vol/gcc/src/hg/master/modula-2/gcc/varasm.cc:3687 0x1013062bb mark_constants_in_pattern /vol/gcc/src/hg/master/modula-2/gcc/varasm.cc:4256 0x10130fb3f mark_constants /vol/gcc/src/hg/master/modula-2/gcc/varasm.cc:4288 0x10130fb3f mark_constant_pool /vol/gcc/src/hg/master/modula-2/gcc/varasm.cc:4304 0x10130fb3f output_constant_pool /vol/gcc/src/hg/master/modula-2/gcc/varasm.cc:4519 0x10130fb3f assemble_start_function(tree_node*, char const*) /vol/gcc/src/hg/master/modula-2/gcc/varasm.cc:1880 0x1009d1cb7 rest_of_handle_final /vol/gcc/src/hg/master/modula-2/gcc/final.cc:4281 0x1009d1cb7 execute /vol/gcc/src/hg/master/modula-2/gcc/final.cc:4363 Thread 2 hit Breakpoint 1, fancy_abort (file=0x100b18c08 "/vol/gcc/src/hg/master/modula-2/gcc/varasm.cc", line=5515, function=0x100b19bb8 "output_constructor_regular_field") at /vol/gcc/src/hg/master/modula-2/gcc/diagnostic.cc:2024 2024 if (global_dc->printer == NULL) (gdb) where #0 fancy_abort (file=0x100b18c08 "/vol/gcc/src/hg/master/modula-2/gcc/varasm.cc", line=5515, function=0x100b19bb8 "output_constructor_regular_field") at /vol/gcc/src/hg/master/modula-2/gcc/diagnostic.cc:2024 #1 0x00000001021b1360 in output_constructor_regular_field (local=0xffffffff7fffbbc8) at /vol/gcc/src/hg/master/modula-2/gcc/varasm.cc:5515 #2 0x00000001021b28c0 in output_constructor (exp=<constructor 0xffffffff7ac4d7d0>, size=4, align=64, reverse=false, outer=0x0) at /vol/gcc/src/hg/master/modula-2/gcc/varasm.cc:5827 #3 0x00000001021afed8 in output_constant (exp=<constructor 0xffffffff7ac4d7d0>, size=4, align=64, reverse=false, merge_strings=false) at /vol/gcc/src/hg/master/modula-2/gcc/varasm.cc:5294 #4 0x00000001021a63a8 in assemble_constant_contents (exp=<constructor 0xffffffff7ac4d7d0>, label=0xffffffff7ac1c7f0 "*.LLC0", align=64, merge_strings=false) at /vol/gcc/src/hg/master/modula-2/gcc/varasm.cc:3642 #5 0x00000001021a6af8 in output_constant_def_contents (symbol=0xffffffff7ac800f0) at /vol/gcc/src/hg/master/modula-2/gcc/varasm.cc:3687 #6 0x00000001021a9008 in mark_constants_in_pattern (insn=0xffffffff7aca7180) at /vol/gcc/src/hg/master/modula-2/gcc/varasm.cc:4256 #7 0x00000001021a91ec in mark_constants (insn=0xffffffff7aca7180) at /vol/gcc/src/hg/master/modula-2/gcc/varasm.cc:4288 #8 0x00000001021a926c in mark_constant_pool () at /vol/gcc/src/hg/master/modula-2/gcc/varasm.cc:4304 #9 0x00000001021aa114 in output_constant_pool (fnname=0xffffffff7ac4d530 "_M2_testgeneric_init", fndecl=<function_decl 0xffffffff7ac72600 _M2_testgeneric_init>) at /vol/gcc/src/hg/master/modula-2/gcc/varasm.cc:4519 #10 0x000000010219bab0 in assemble_start_function (decl=<function_decl 0xffffffff7ac72600 _M2_testgeneric_init>, fnname=0xffffffff7ac4d530 "_M2_testgeneric_init") at /vol/gcc/src/hg/master/modula-2/gcc/varasm.cc:1880 #11 0x00000001012c7320 in rest_of_handle_final () at /vol/gcc/src/hg/master/modula-2/gcc/final.cc:4281 #12 0x00000001012c7aec in (anonymous namespace)::pass_final::execute (this=0x103c0d0b0) at /vol/gcc/src/hg/master/modula-2/gcc/final.cc:4363 #13 0x00000001018ce598 in execute_one_pass (pass=<opt_pass* 0x103c0d0b0 "final"(338)>) at /vol/gcc/src/hg/master/modula-2/gcc/passes.cc:2638 #14 0x00000001018cebb0 in execute_pass_list_1 (pass=<opt_pass* 0x103c0d0b0 "final"(338)>) at /vol/gcc/src/hg/master/modula-2/gcc/passes.cc:2738 #15 0x00000001018cec08 in execute_pass_list_1 (pass=<opt_pass* 0x103c0ca90 "*all-late_compilation"(-1)>) at /vol/gcc/src/hg/master/modula-2/gcc/passes.cc:2739 #16 0x00000001018cec08 in execute_pass_list_1 (pass=<opt_pass* 0x103c0ab10 "*rest_of_compilation"(-1)>) at /vol/gcc/src/hg/master/modula-2/gcc/passes.cc:2739 #17 0x00000001018cec9c in execute_pass_list (fn=0xffffffff7ac7a000, pass=<opt_pass* 0x103c05d30 "fixup_cfg"(99)>) at /vol/gcc/src/hg/master/modula-2/gcc/passes.cc:2749 #18 0x000000010108cf98 in cgraph_node::expand (this=<cgraph_node * const 0xffffffff7ac7e000 "_M2_testgeneric_init"/0>) at /vol/gcc/src/hg/master/modula-2/gcc/cgraphunit.cc:1835 #19 0x000000010108db44 in expand_all_functions () at /vol/gcc/src/hg/master/modula-2/gcc/cgraphunit.cc:1999 #20 0x000000010108ef44 in symbol_table::compile (this=0xffffffff7ac10000) at /vol/gcc/src/hg/master/modula-2/gcc/cgraphunit.cc:2349 #21 0x000000010108f6dc in symbol_table::finalize_compilation_unit (this=0xffffffff7ac10000) at /vol/gcc/src/hg/master/modula-2/gcc/cgraphunit.cc:2530 #22 0x0000000101ac0ca8 in compile_file () at /vol/gcc/src/hg/master/modula-2/gcc/toplev.cc:479 #23 0x0000000101ac6f90 in do_compile (no_backend=false) at /vol/gcc/src/hg/master/modula-2/gcc/toplev.cc:2168 #24 0x0000000101ac7700 in toplev::main (this=0xffffffff7fffcffa, argc=50, argv=0xffffffff7fffd0c8) at /vol/gcc/src/hg/master/modula-2/gcc/toplev.cc:2320 #25 0x000000010311be58 in main (argc=50, argv=0xffffffff7fffd0c8) at /vol/gcc/src/hg/master/modula-2/gcc/main.cc:39