In file included from /Users/apinski/src/local/gcc/libgcc/../gcc/unwind-dw2-fde-darwin.c:34:0:/Users/apinski/src/local/gcc/libgcc/../gcc/unwind-pe.h: In function 'size_of_encoded_value': /Users/apinski/src/local/gcc/libgcc/../gcc/unwind-pe.h:89:1: internal compiler error: in dwarf2out_frame_debug_adjust_cfa, at dwarf2out.c:1770 Please submit a full bug report,with preprocessed source if appropriate. Why it does not fail during stage1 is interesting for me.
I got the same on hppa-linux: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40338 See rev and commit info there.
Laurent, I don't seem to be able to reproduce your PA problem from a cross-compile. Please attach a preprocessed file that exhibits the problem.
Likewise, Andrew, I'll need a preprocessed file. Assuming something that doesn't show up w/ stage1 can even be reproduced via cross-compiler. Failing that, give me as much information as you can about how the CFA variable changes over the compilation of this function.
A bootstrap on hppa-linux-gnu works for me with the patch suggested in PR 40462, still seeing a bootstrap failure on sparc-linux-gnu, as in PR40352. No preprocessed source yet.
On sparc64-linux bootstrap worked at rev 147974 but failed at rev 148004 (far mmachine gcc62). I get the same failure on sparc-linux (farm machine gcc54). I'll try to get a preprocessed file, another option is to get an account on the compile farm, procedure here: http://gcc.gnu.org/wiki/CompileFarm
Created attachment 18113 [details] unwind-dw2-fde-glibc.i unwind-dw2-fde-glibc.i /home/guerby/build/./gcc/xgcc -B/home/guerby/build/./gcc/ -B/n/54/guerby/install-trunk/sparc64-unknown-linux-gnu/bin/ -B/n/54/guerby/install-trunk/sparc64-unknown-linux-gnu/lib/ -isystem /n/54/guerby/install-trunk/sparc64-unknown-linux-gnu/include -isystem /n/54/guerby/install-trunk/sparc64-unknown-linux-gnu/sys-include -g -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../.././gcc -I../../../trunk/libgcc -I../../../trunk/libgcc/. -I../../../trunk/libgcc/../gcc -I../../../trunk/libgcc/../include -DHAVE_CC_TLS -o unwind-dw2-fde-glibc.o -MT unwind-dw2-fde-glibc.o -MD -MP -MF unwind-dw2-fde-glibc.dep -fexceptions -c ../../../trunk/libgcc/../gcc/unwind-dw2-fde-glibc.c -fvisibility=hidden -DHIDE_EXPORTS
backtrace GNU C (GCC) version 4.5.0 20090701 (experimental) [trunk revision 149143] (sparc64-unknown-linux-gnu) compiled by GNU C version 4.3.3, GMP version 4.2.1, MPFR version 2.3.2 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Compiler executable checksum: 8427efa082a737e8dae184d16956f822 ../../../trunk/libgcc/../gcc/unwind-dw2-fde-glibc.c: In function '_Unwind_IteratePhdrCallback': ../../../trunk/libgcc/../gcc/unwind-dw2-fde-glibc.c:194:5: warning: jump skips variable initialization ../../../trunk/libgcc/../gcc/unwind-dw2-fde-glibc.c:274:2: note: label 'found' defined here ../../../trunk/libgcc/../gcc/unwind-dw2-fde-glibc.c:229:27: note: 'pc_high' declared here ../../../trunk/libgcc/../gcc/unwind-dw2-fde-glibc.c:194:5: warning: jump skips variable initialization ../../../trunk/libgcc/../gcc/unwind-dw2-fde-glibc.c:274:2: note: label 'found' defined here ../../../trunk/libgcc/../gcc/unwind-dw2-fde-glibc.c:229:15: note: 'pc_low' declared here Breakpoint 1, internal_error (gmsgid=0x290eae8 "../../trunk/gcc/dwarf2out.c") at ../../trunk/gcc/diagnostic.c:674 674 va_start (ap, gmsgid); (gdb) bt #0 internal_error (gmsgid=0x290eae8 "../../trunk/gcc/dwarf2out.c") at ../../trunk/gcc/diagnostic.c:674 #1 0x005d1e58 in fancy_abort (file=0x290eae8 "../../trunk/gcc/dwarf2out.c", line=2773, function=0x290efe8 "dwarf2out_begin_epilogue") at ../../trunk/gcc/diagnostic.c:730 #2 0x006251e4 in dwarf2out_begin_epilogue (insn=0xf769d3b0) at ../../trunk/gcc/dwarf2out.c:2773 #3 0x00789a44 in final_scan_insn (insn=0xf769d3b0, file=0x2b98160, optimize=2, nopeepholes=0, seen=0xffffce24) at ../../trunk/gcc/final.c:1893 #4 0x00789144 in final (first=0xf769cff0, file=0x2b98160, optimize=2) at ../../trunk/gcc/final.c:1714 #5 0x0078f554 in rest_of_handle_final () at ../../trunk/gcc/final.c:4226 #6 0x00cb0294 in execute_one_pass (pass=0x2abdff8) at ../../trunk/gcc/passes.c:1289 #7 0x00cb0558 in execute_pass_list (pass=0x2abdff8) at ../../trunk/gcc/passes.c:1338 #8 0x00cb0594 in execute_pass_list (pass=0x2af2394) at ../../trunk/gcc/passes.c:1339 #9 0x00cb0594 in execute_pass_list (pass=0x2af2360) at ../../trunk/gcc/passes.c:1339 #10 0x0140f160 in tree_rest_of_compilation (fndecl=0xf7a77900) at ../../trunk/gcc/tree-optimize.c:394 #11 0x01f75fb8 in cgraph_expand_function (node=0xf7bd4d00) at ../../trunk/gcc/cgraphunit.c:1098 #12 0x01f76250 in cgraph_expand_all_functions () at ../../trunk/gcc/cgraphunit.c:1157 #13 0x01f76b2c in cgraph_optimize () at ../../trunk/gcc/cgraphunit.c:1380 #14 0x000e3c7c in c_write_global_declarations () at ../../trunk/gcc/c-decl.c:9410 #15 0x010ab498 in compile_file () at ../../trunk/gcc/toplev.c:1037 #16 0x010ae928 in do_compile () at ../../trunk/gcc/toplev.c:2346 #17 0x010aea8c in toplev_main (argc=62, argv=0xffffd5c4) at ../../trunk/gcc/toplev.c:2391 #18 0x002dce20 in main (argc=62, argv=0xffffd5c4) at ../../trunk/gcc/main.c:35 (gdb) f 2 #2 0x006251e4 in dwarf2out_begin_epilogue (insn=0xf769d3b0) at ../../trunk/gcc/dwarf2out.c:2773 2773 gcc_assert (i != NULL); (gdb) l 2768 if (!saw_frp) 2769 return; 2770 2771 /* Otherwise, search forward to see if the return insn was the last 2772 basic block of the function. If so, we don't need save/restore. */ 2773 gcc_assert (i != NULL); 2774 i = next_real_insn (i); 2775 if (i == NULL) 2776 return; 2777 (gdb) (gdb) info local saw_frp = 1 '\001' i = (rtx) 0x0 __FUNCTION__ = "dwarf2out_begin_epilogue" (gdb) info arg insn = (rtx) 0xf769d3b0 (gdb) call debug_rtx(insn) (note 19 8 17 NOTE_INSN_EPILOGUE_BEG) (gdb)
*** Bug 40352 has been marked as a duplicate of this bug. ***
Mine.
Subject: Bug 40347 Author: rth Date: Wed Jul 1 23:21:17 2009 New Revision: 149158 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149158 Log: PR bootstrap/40347 * function.c (reposition_prologue_and_epilogue_notes): If epilogue contained no insns, reposition note before last insn. Modified: trunk/gcc/ChangeLog trunk/gcc/function.c
Tested the fix for sparc; re-open if it's not fixed for darwin too.
*** Bug 40611 has been marked as a duplicate of this bug. ***