------- Additional Comments From davidm at hpl dot hp dot com 2004-12-20 22:13 ------- (In reply to comment #1) > Without a test case, nobody can give this bug a proper look. Can you > provide an example of how this fails for you?
Sorry, that was sloppy of me. I'll attach a minimal test-case (bug.c). With that file: $ gcc -v 2>&1|grep version gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3) $ gcc -c -O2 bug.c $ objdump -d bug.o |tail -2 76: 48 81 c4 28 10 00 00 add $0x1028,%rsp 7d: c3 retq $ readelf -wf bug.o The section .eh_frame contains: 00000000 00000014 00000000 CIE Version: 1 Augmentation: "" Code alignment factor: 1 Data alignment factor: -8 Return address column: 16 DW_CFA_def_cfa: r7 ofs 8 DW_CFA_offset: r16 at cfa-8 DW_CFA_nop DW_CFA_nop DW_CFA_nop DW_CFA_nop DW_CFA_nop DW_CFA_nop 00000018 00000024 0000001c FDE cie=00000000 pc=00000000..0000007e DW_CFA_advance_loc: 5 to 00000005 DW_CFA_offset: r6 at cfa-32 DW_CFA_advance_loc: 24 to 0000001d DW_CFA_def_cfa_offset: 4144 DW_CFA_offset: r13 at cfa-16 DW_CFA_offset: r3 at cfa-40 DW_CFA_offset: r12 at cfa-24 While the code came out slightly differently, the same problem exists: the DWARF2 frame info fails to describe the effect of popping the stack in the second-last instruction. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18749