http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48932
Summary: ICE in check_dep, at sched-deps.c:4097 Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: dang...@gcc.gnu.org Host: hppa2.0w-hp-hpux11* Target: hppa2.0w-hp-hpux11* Build: hppa2.0w-hp-hpux11* Gcc-4.7 bootstrap fails in stage1 with both gcc-4.3.5 and gcc-4.4.4 as the bootstrap compiler when STAGE1_CFLAGS="-g -O1". This occurs configuring libgcc: checking for suffix of object files... configure: error: in `/xxx/gnu/gcc/objdir /hppa2.0w-hp-hpux11.00/libgcc': configure: error: cannot compute suffix of object files: cannot compile See `config.log' for more details. configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "GNU C Runtime Library" | #define PACKAGE_TARNAME "libgcc" | #define PACKAGE_VERSION "1.0" | #define PACKAGE_STRING "GNU C Runtime Library 1.0" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "http://www.gnu.org/software/libgcc/" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } The problem occurs in the first call to check_dep: Breakpoint 1, check_dep (dep=0x980800, relaxed_p=0 '\000') at ../../gcc/gcc/sched-deps.c:4097 4097 gcc_assert (ds == -1); (gdb) bt #0 check_dep (dep=0x980800, relaxed_p=0 '\000') at ../../gcc/gcc/sched-deps.c:4097 #1 0x007c8aa0 in add_or_update_dep_1 (new_dep=0x7eff0f78, resolved_p=0 '\000', mem1=0x0, mem2=0x0) at ../../gcc/gcc/sched-deps.c:1125 #2 0x007c9098 in maybe_add_or_update_dep_1 (dep=0x980800, resolved_p=0 '\000', mem1=0x0, mem2=0x0) at ../../gcc/gcc/sched-deps.c:858 #3 0x007c9114 in haifa_note_dep (elem=0x7af877d0, ds=0) at ../../gcc/gcc/sched-deps.c:1676 #4 0x007c2ab8 in note_dep (e=0x980800, ds=0) at ../../gcc/gcc/sched-deps.c:1711 #5 0x007c33a8 in add_dependence (insn=0x980800, elem=0x0, dep_type=REG_DEP_TRUE) at ../../gcc/gcc/sched-deps.c:3817 #6 0x007c4a70 in add_dependence_list (insn=0x7af87848, list=0x7afaf7c0, uncond=0, dep_type=REG_DEP_TRUE) at ../../gcc/gcc/sched-deps.c:1394 #7 0x007ca3b0 in sched_analyze_insn (deps=0x7eff0bcc, x=0x400f16c0, insn=0x7af87848) at ../../gcc/gcc/sched-deps.c:2824 #8 0x007cb428 in deps_analyze_insn (deps=0x7eff0bcc, insn=0x7af87848) at ../../gcc/gcc/sched-deps.c:3249 #9 0x007cbbc0 in sched_analyze (deps=0x7eff0bcc, head=0x7af87848, tail=0x7af87848) at ../../gcc/gcc/sched-deps.c:3397 #10 0x005a18cc in sched_rgn_compute_dependencies (rgn=9963520) at ../../gcc/gcc/sched-rgn.c:2715 #11 0x005a610c in schedule_insns () at ../../gcc/gcc/sched-rgn.c:2927 #12 0x005a6800 in rest_of_handle_sched () at ../../gcc/gcc/sched-rgn.c:3501 #13 0x0032130c in execute_one_pass (pass=0x400253c8) at ../../gcc/gcc/passes.c:1556 #14 0x003215c4 in execute_pass_list (pass=0x400253c8) at ../../gcc/gcc/passes.c:1610 #15 0x003215d8 in execute_pass_list (pass=0x4001b988) at ../../gcc/gcc/passes.c:1611 #16 0x006015ac in tree_rest_of_compilation (fndecl=0x7afa8900) at ../../gcc/gcc/tree-optimize.c:417 #17 0x00419088 in cgraph_expand_function (node=0x7afb7000) at ../../gcc/gcc/cgraphunit.c:1625 #18 0x0041bb4c in cgraph_optimize () at ../../gcc/gcc/cgraphunit.c:1684 #19 0x0041bd74 in cgraph_finalize_compilation_unit () at ../../gcc/gcc/cgraphunit.c:1121 #20 0x0004e858 in c_write_global_declarations () at ../../gcc/gcc/c-decl.c:9844 #21 0x00350b34 in toplev_main (argc=0, argv=0x0) at ../../gcc/gcc/toplev.c:586 #22 0x001028fc in main (argc=9963520, argv=0x0) at ../../gcc/gcc/main.c:36 add_or_update_dep_1 appears to be miscompiled: 0x007c8a6c <add_or_update_dep_1+92>: cmpib,<< 3,r20,0x7c8a7c <add_or_update_dep_1+108> 0x007c8a70 <add_or_update_dep_1+96>: ldil L%980800,r26 => 0x007c8a74 <add_or_update_dep_1+100>: cmpb,<>,n r19,ret0,0x7c8a90 <add_or_update_dep_1+128> 0x007c8a78 <add_or_update_dep_1+104>: ldil L%980800,r26 0x007c8a7c <add_or_update_dep_1+108>: ldo b0(r26),r26 0x007c8a80 <add_or_update_dep_1+112>: ldi 462,r25 0x007c8a84 <add_or_update_dep_1+116>: ldil L%980800,r24 0x007c8a88 <add_or_update_dep_1+120>: b,l 0x7c89f0 <sd_find_dep_between+376>,rp 0x007c8a8c <add_or_update_dep_1+124>: ldo 2e4(r24),r24 0x007c8a90 <add_or_update_dep_1+128>: cmpiclr,= 0,r24,r25 0x007c8a94 <add_or_update_dep_1+132>: ldi 1,r25 0x007c8a98 <add_or_update_dep_1+136>: b,l 0x7c33c0 <check_dep>,rp 0x007c8a9c <add_or_update_dep_1+140>: nop It appears the cmpib instruction needs nullification, or the ldil L%980800,r26 instruction has been incorrectly placed in the delay slot of the branch.