https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83387
Bug ID: 83387 Summary: PowerPC64 + Ada + RTEMS: Infinite loops in do_reload() Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: sebastian.hu...@embedded-brains.de Target Milestone: --- I added support for the 64-bit PowerPC some months ago using a variant of the ELFv2 ABI. I don't know which kind of long double support I use on this target. This is difficult for me to understand how this works on 64-bit PowerPC. This was no problem up to now since nobody used long double with RTEMS on this target. I tried to build a GCC with Ada support today for the powerpc-rtems5 target. It ends up in infinite loops while building the Ada run-time multilib for a 64-bit PowerPC variant. To reproduce the problem you can log in to gcc67: cd /home/sh/tmp/b-gcc/gcc/ada/rts_me6500_m64_nof_noaltivec gdb --args /home/sh/tmp/b-gcc/./gcc/gnat1 -gnatwa -quiet -nostdinc -nostdinc -dumpbase a-coteio.ads -auxbase-strip a-coteio.o -O2 -Wextra -Wall -g -mcpu=e6500 -msoft-float -gnatpg -mcpu=e6500 -m64 -msoft-float -mno-altivec -gnatO a-scteio.o a-scteio.ads -o - ... (gdb) bt #0 spill_pseudos (set=0x7fffffffdf50) at /home/sh/tmp/gcc/gcc/lra-eliminations.c:1164 #1 update_reg_eliminate(bitmap_head*) () at /home/sh/tmp/gcc/gcc/lra-eliminations.c:1288 #2 0x0000000000cfbbb3 in lra_eliminate(bool, bool) () at /home/sh/tmp/gcc/gcc/lra-eliminations.c:1449 #3 0x0000000000ce35ea in lra(_IO_FILE*) () at /home/sh/tmp/gcc/gcc/lra.c:2493 #4 0x0000000000c9c6a2 in do_reload () at /home/sh/tmp/gcc/gcc/ira.c:5443 #5 (anonymous namespace)::pass_reload::execute(function*) () at /home/sh/tmp/gcc/gcc/ira.c:5627 #6 0x0000000000d61a1b in execute_one_pass(opt_pass*) () at /home/sh/tmp/gcc/gcc/passes.c:2497 #7 0x0000000000d62255 in execute_pass_list_1(opt_pass*) () at /home/sh/tmp/gcc/gcc/passes.c:2586 #8 0x0000000000d62267 in execute_pass_list_1(opt_pass*) () at /home/sh/tmp/gcc/gcc/passes.c:2587 #9 0x0000000000d62299 in execute_pass_list(function*, opt_pass*) () at /home/sh/tmp/gcc/gcc/passes.c:2597 #10 0x0000000000aabaee in cgraph_node::expand() () at /home/sh/tmp/gcc/gcc/cgraphunit.c:2139 #11 0x0000000000aaccbc in expand_all_functions () at /home/sh/tmp/gcc/gcc/cgraphunit.c:2275 #12 symbol_table::compile() [clone .part.75] () at /home/sh/tmp/gcc/gcc/cgraphunit.c:2623 #13 0x0000000000aaefaa in symbol_table::compile (this=0x7ffff753c000) at /home/sh/tmp/gcc/gcc/cgraphunit.c:2537 #14 symbol_table::finalize_compilation_unit (this=0x7ffff753c000) at /home/sh/tmp/gcc/gcc/cgraphunit.c:2716 #15 0x0000000000e1efc3 in compile_file () at /home/sh/tmp/gcc/gcc/toplev.c:480 #16 0x000000000068be0b in do_compile () at /home/sh/tmp/gcc/gcc/toplev.c:2059 #17 toplev::main(int, char**) () at /home/sh/tmp/gcc/gcc/toplev.c:2194 #18 0x000000000068e07b in main (argc=25, argv=0x7fffffffe418) at /home/sh/tmp/gcc/gcc/main.c:39 gdb --args /home/sh/tmp/b-gcc/./gcc/gnat1 -gnatwa -quiet -nostdinc -nostdinc -dumpbase a-coteio.ads -auxbase-strip a-coteio.o -O2 -Wextra -Wall -g -mcpu=e6500 -msoft-float -gnatpg -mcpu=e6500 -m64 -msoft-float -mno-altivec -gnatO a-coteio.o a-coteio.ads -o - ... (gdb) bt #0 process_bb_lives(basic_block_def*, int&, bool) () at /home/sh/tmp/gcc/gcc/lra-lives.c:726 #1 0x0000000000cff3ea in lra_create_live_ranges_1(bool, bool) () at /home/sh/tmp/gcc/gcc/lra-lives.c:1316 #2 0x0000000000cffea0 in lra_create_live_ranges(bool, bool) () at /home/sh/tmp/gcc/gcc/lra-lives.c:1380 #3 0x0000000000ce36fa in lra(_IO_FILE*) () at /home/sh/tmp/gcc/gcc/lra.c:2434 #4 0x0000000000c9c6a2 in do_reload () at /home/sh/tmp/gcc/gcc/ira.c:5443 #5 (anonymous namespace)::pass_reload::execute(function*) () at /home/sh/tmp/gcc/gcc/ira.c:5627 #6 0x0000000000d61a1b in execute_one_pass(opt_pass*) () at /home/sh/tmp/gcc/gcc/passes.c:2497 #7 0x0000000000d62255 in execute_pass_list_1(opt_pass*) () at /home/sh/tmp/gcc/gcc/passes.c:2586 #8 0x0000000000d62267 in execute_pass_list_1(opt_pass*) () at /home/sh/tmp/gcc/gcc/passes.c:2587 #9 0x0000000000d62299 in execute_pass_list(function*, opt_pass*) () at /home/sh/tmp/gcc/gcc/passes.c:2597 #10 0x0000000000aabaee in cgraph_node::expand() () at /home/sh/tmp/gcc/gcc/cgraphunit.c:2139 #11 0x0000000000aaccbc in expand_all_functions () at /home/sh/tmp/gcc/gcc/cgraphunit.c:2275 #12 symbol_table::compile() [clone .part.75] () at /home/sh/tmp/gcc/gcc/cgraphunit.c:2623 #13 0x0000000000aaefaa in symbol_table::compile (this=0x7ffff753c000) at /home/sh/tmp/gcc/gcc/cgraphunit.c:2537 #14 symbol_table::finalize_compilation_unit (this=0x7ffff753c000) at /home/sh/tmp/gcc/gcc/cgraphunit.c:2716 #15 0x0000000000e1efc3 in compile_file () at /home/sh/tmp/gcc/gcc/toplev.c:480 #16 0x000000000068be0b in do_compile () at /home/sh/tmp/gcc/gcc/toplev.c:2059 #17 toplev::main(int, char**) () at /home/sh/tmp/gcc/gcc/toplev.c:2194 #18 0x000000000068e07b in main (argc=25, argv=0x7fffffffe418) at /home/sh/tmp/gcc/gcc/main.c:39 Scripts to set it up: /home/sh/tmp/env.sh /home/sh/tmp/download.sh /home/sh/tmp/build.sh