Created attachment 33726 [details] config log from ia64-hp-hpux11.23\hpux64\libgcc System ------ HP-UX clhpux1i B.11.23 U ia64 Configure Line -------------- /shares/scratch/users/b/gcc/clhpux1i_32/gcc-4.9.1/./configure --prefix=/shares/source/itlinks/opt/hpux_ia64/11.2/32/gcc-4.9.1 --with-gmp=/opt/32/gmp-6.0.0 --with-mpfr=/opt/32/mpfr-3.1.2 --with-mpc=/opt/32/mpc-1.0.2 --enable-languages=c,c++ CC=/opt/32/gcc-4.7.4/bin/gcc CXX=/opt/32/gcc-4.7.4/bin/g++ --disable-bootstrap --with-gnu-as --with-as=/opt/binutils-2.24/bin/as --without-gnu-ld Error during build ------------------ gmake[4]: Entering directory `/shares/scratch/users/b/gcc/clhpux1i_32/gcc491_debug/ia64-hp-hpux11.23/hpux64/libgcc' # If this is the top-level multilib, build all the other # multilibs. /u/scratch/users/b/gcc/clhpux1i_32/gcc491_debug/./gcc/xgcc -B/u/scratch/users/b/gcc/clhpux1i_32/gcc491_debug/./gcc/ -B/shares/source/itlinks/opt/hpux_ia64/11.2/32/gcc-4.9.1/ia64-hp-hpux11.23/bin/ -B/shares/source/itlinks/opt/hpux_ia64/11.2/32/gcc-4.9.1/ia64-hp-hpux11.23/lib/ -isystem /shares/source/itlinks/opt/hpux_ia64/11.2/32/gcc-4.9.1/ia64-hp-hpux11.23/include -isystem /shares/source/itlinks/opt/hpux_ia64/11.2/32/gcc-4.9.1/ia64-hp-hpux11.23/sys-include -g -O2 -mlp64 -O2 -g -O2 -DIN_GCC -DUSE_LIBUNWIND_EXCEPTIONS -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -I. -I. -I../../.././gcc -I/shares/scratch/users/b/gcc/clhpux1i_32/gcc-4.9.1/./libgcc -I/shares/scratch/users/b/gcc/clhpux1i_32/gcc-4.9.1/./libgcc/. -I/shares/scratch/users/b/gcc/clhpux1i_32/gcc-4.9.1/./libgcc/../gcc -I/shares/scratch/users/b/gcc/clhpux1i_32/gcc-4.9.1/./libgcc/../include -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c /shares/scratch/users/b/gcc/clhpux1i_32/gcc-4.9.1/./libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS /shares/scratch/users/b/gcc/clhpux1i_32/gcc-4.9.1/./libgcc/libgcc2.c: In function '__multi3': /shares/scratch/users/b/gcc/clhpux1i_32/gcc-4.9.1/./libgcc/libgcc2.c:557:1: internal compiler error: Segmentation fault } ^ libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. gmake[4]: *** [_muldi3.o] Error 1 gmake[4]: Leaving directory `/shares/scratch/users/b/gcc/clhpux1i_32/gcc491_debug/ia64-hp-hpux11.23/hpux64/libgcc' gmake[3]: *** [multi-do] Error 1 gmake[3]: Leaving directory `/shares/scratch/users/b/gcc/clhpux1i_32/gcc491_debug/ia64-hp-hpux11.23/libgcc' gmake[2]: *** [all-multi] Error 2 gmake[2]: Leaving directory `/shares/scratch/users/b/gcc/clhpux1i_32/gcc491_debug/ia64-hp-hpux11.23/libgcc' gmake[1]: *** [all-target-libgcc] Error 2 gmake[1]: Leaving directory `/shares/scratch/users/b/gcc/clhpux1i_32/gcc491_debug' gmake: *** [all] Error 2 Traceback from failure ---------------------- (gdb) bt #0 0x5830880 in <unknown_procedure> () warning: Attempting to unwind past bad PC 0x5830880 #1 0x555c170 in hash_table<cselib_hasher,xcallocator>::find_slot_with_hash ( this=Unhandled dwarf expression opcode ) #2 0x4501220:0 in _ZL16cselib_find_slotP7rtx_defj13insert_option12machine_mode (x=Unhandled dwarf expression opcode ) #3 0x45013a0:0 in cselib_lookup (x=Unhandled dwarf expression opcode ) #4 0x4506460:0 in _ZL18cselib_record_setsP7rtx_def (insn=0x76d98a78) #5 0x450a3d0:0 in cselib_process_insn (insn=Unhandled dwarf expression opcode ) #6 0x52b6ab0:0 in _ZL18rest_of_handle_dsev () #7 0x49fe960:0 in execute_one_pass (pass=Unhandled dwarf expression opcode ) #8 0x49ff4a0:0 in execute_pass_list (pass=0x4027b710) #9 0x49ff500:0 in execute_pass_list (pass=0x4027aed0) #10 0x44de270:0 in _ZL15expand_functionP11cgraph_node (node=Unhandled dwarf expression opcode ) #11 0x44e3800:0 in compile () #12 0x44e4060:0 in finalize_compilation_unit () #13 0x4265f90:0 in c_write_global_declarations () #14 0x4bb8680:0 in _ZL12compile_filev () #15 0x4bbdb30:0 in toplev_main (argc=75, argv=0x7ffff178) #16 0x5431a70:0 in main (argc=75, argv=0x7ffff178) at /shares/scratch/users/b/gcc/clhpux1i_32/gcc-4.9.1/./gcc/main.c:37 Notes ----- The failed compilation step is: /u/scratch/users/b/gcc/clhpux1i_32/gcc491_debug/./gcc/xgcc -B/u/scratch/users/b/gcc/clhpux1i_32/gcc491_debug/./gcc/ -B/shares/source/itlinks/opt/hpux_ia64/11.2/32/gcc-4.9.1/ia64-hp-hpux11.23/bin/ -B/shares/source/itlinks/opt/hpux_ia64/11.2/32/gcc-4.9.1/ia64-hp-hpux11.23/lib/ -isystem /shares/source/itlinks/opt/hpux_ia64/11.2/32/gcc-4.9.1/ia64-hp-hpux11.23/include -isystem /shares/source/itlinks/opt/hpux_ia64/11.2/32/gcc-4.9.1/ia64-hp-hpux11.23/sys-include -g -O2 -mlp64 -O2 -g -O2 -DIN_GCC -DUSE_LIBUNWIND_EXCEPTIONS -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -I. -I. -I../../.././gcc -I/shares/scratch/users/b/gcc/clhpux1i_32/gcc-4.9.1/./libgcc -I/shares/scratch/users/b/gcc/clhpux1i_32/gcc-4.9.1/./libgcc/. -I/shares/scratch/users/b/gcc/clhpux1i_32/gcc-4.9.1/./libgcc/../gcc -I/shares/scratch/users/b/gcc/clhpux1i_32/gcc-4.9.1/./libgcc/../include -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c /shares/scratch/users/b/gcc/clhpux1i_32/gcc-4.9.1/./libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS If i change the optimization flag to -O0, the compilation succeeds.
Please provide preprocessed source of the failing compile.
Created attachment 33734 [details] Preprocessed Source for Failing Compile
Simplified Preprocessed source fails with same error ---------------------------------------------------- typedef int TItype __attribute__((mode(TI))); typedef int DItype __attribute__((mode(DI))); typedef unsigned int UDItype __attribute__((mode(DI))); struct DWstruct { DItype high, low; }; typedef union { struct DWstruct s; TItype ll; } DWunion; TItype __multi3(TItype u, TItype v) { const DWunion uu = { .ll = u }; const DWunion vv = { .ll = v }; DWunion w = { .ll = ({ DWunion __w; __asm__("xma.hu %0 = %2, %3, f0\n\txma.l %1 = %2, %3, f0" : "=&f" (__w.s.high) , "=f" (__w.s.low) : "f" (uu.s.low), "f" (vv.s.low)); __w.ll; }) }; w.s.high += ((UDItype)uu.s.low * (UDItype)vv.s.high + (UDItype)uu.s.high * (UDItype)vv.s.low); return w.ll; }
Much simpler test case ---------------------- struct DWstruct { int high, low; }; typedef union { struct DWstruct s; int ll; } DWunion; int __multi3(int u, int v) { const DWunion uu = { .ll = u }; return 0; } Build Line: ----------- /u/scratch/users/b/gcc/hp/gcc491_debug/./gcc/xgcc -B/u/scratch/users/b/gcc/hp/gcc491_debug/./gcc/ -B/shares/source/itlinks/opt/hpux_ia64/11.2/32/gcc-4.9.1/ia64-hp-hpux11.23/bin/ -mlp64 -g -O2 -o _muldi3.o -c test2.c Traceback of failure -------------------- #0 0x5830880 in <unknown_procedure> () warning: Attempting to unwind past bad PC 0x5830880 #1 0x555be50 in hash_table<cselib_hasher,xcallocator>::find_slot_with_hash ( this=Unhandled dwarf expression opcode ) #2 0x4501220:0 in _ZL16cselib_find_slotP7rtx_defj13insert_option12machine_mode (x=Unhandled dwarf expression opcode ) #3 0x45013a0:0 in cselib_lookup (x=Unhandled dwarf expression opcode ) #4 0x50aa630:0 in _ZL8use_typeP7rtx_defP14count_use_infoP12machine_mode (loc=Unhandled dwarf expression opcode ) #5 0x50aaa70:0 in _ZL8add_usesPP7rtx_defPv (ploc=Unhandled dwarf expression opcode ) #6 0x4aeac10:0 in for_each_rtx (x=Unhandled dwarf expression opcode ) #7 0x50a6070:0 in _ZL10add_uses_1PP7rtx_defPv (x=0x76f8b6f8, cui=0x7fffc680) #8 0x4ae4bf0:0 in note_uses (pbody=Unhandled dwarf expression opcode ) #9 0x50abfb0:0 in _ZL13add_with_setsP7rtx_defP10cselib_seti (insn=Unhandled dwarf expression opcode ) #10 0x4506080:0 in _ZL18cselib_record_setsP7rtx_def (insn=0x76f8b6e0) #11 0x450a3d0:0 in cselib_process_insn (insn=Unhandled dwarf expression opcode ) #12 0x50b8980:0 in _ZL13vt_initializev () #13 0x50d6840:0 in variable_tracking_main () #14 0x511f1c0:0 in _ZL10ia64_reorgv () #15 0x4adbe50:0 in _GLOBAL__N_1::pass_machine_reorg::execute (this=0x49fe960:0) at /shares/scratch/users/b/gcc/hp/gcc-4.9.1/./gcc/reorg.c:3936 #16 0x49fe960:0 in execute_one_pass (pass=Unhandled dwarf expression opcode ) #17 0x49ff4a0:0 in execute_pass_list (pass=0x4027c610) #18 0x49ff500:0 in execute_pass_list (pass=0x4027bd50) #19 0x49ff500:0 in execute_pass_list (pass=0x4027aed0) ---Type <return> to continue, or q <return> to quit--- #20 0x44de270:0 in _ZL15expand_functionP11cgraph_node (node=Unhandled dwarf expression opcode ) #21 0x44e3800:0 in compile () #22 0x44e4060:0 in finalize_compilation_unit () #23 0x4265f90:0 in c_write_global_declarations () #24 0x4bb8680:0 in _ZL12compile_filev () #25 0x4bbdb30:0 in toplev_main (argc=23, argv=0x7ffff5b8) #26 0x5431a70:0 in main (argc=23, argv=0x7ffff5b8) at /shares/scratch/users/b/gcc/hp/gcc-4.9.1/./gcc/main.c:37
4.9.3 exhibits the same problem on 11.23/IA and 11.31/IA.
(In reply to Bill Klees from comment #4) > Much simpler test case > ---------------------- > struct DWstruct { int high, low; }; > > typedef union > { > struct DWstruct s; > int ll; > } DWunion; > > int > __multi3(int u, int v) > { > const DWunion uu = { .ll = u }; > return 0; > } > > > Build Line: > ----------- > /u/scratch/users/b/gcc/hp/gcc491_debug/./gcc/xgcc > -B/u/scratch/users/b/gcc/hp/gcc491_debug/./gcc/ > -B/shares/source/itlinks/opt/hpux_ia64/11.2/32/gcc-4.9.1/ia64-hp-hpux11.23/ > bin/ -mlp64 -g -O2 -o _muldi3.o -c test2.c > This compiles fine for me on i386-apple-darwin9.8.0, so I'm assuming it must come down to target differences. Changing component from bootstrap to target.
Changing from WAITING back to UNCONFIRMED because the reporter provided the materials requested, it was just that no one was able to confirm that they trigger the bug in question. Thus the ball isn't in the reporter's court (which is what WAITING implies), but rather GCC's court.
cc-ing HPUX maintainer
I can't help much as I don't have a ia64 system. I don't think the issue in this PR relates directly to hpux. Rather, the bootstrap compiler has miscompiled the stage1 compiler. The 4.9 branch has been closed for a long time. gcc-8 is known to work reasonably well on ia64 Debian linux. I would suggest the interested parties see if they can find a bootstrap compiler that will successfully build gcc-8. No one seems to have tried testcase using a ia64-hpux cross compiler. Haven't heard back status of PR 61577. It's also a bootstrap issue.
Does this still happen with GCC 8 and above?