diff options
author | 2006-10-01 21:09:19 +0000 | |
---|---|---|
committer | 2006-10-01 21:09:19 +0000 | |
commit | e0b67d151f2c9bf2fed1a8e3576e17f78d9cc3d7 (patch) | |
tree | d0845568c610c1a45e03160c18c2daba5d84aa6d /4.1.1 | |
parent | document (diff) | |
download | gcc-patches-e0b67d151f2c9bf2fed1a8e3576e17f78d9cc3d7.tar.gz gcc-patches-e0b67d151f2c9bf2fed1a8e3576e17f78d9cc3d7.tar.bz2 gcc-patches-e0b67d151f2c9bf2fed1a8e3576e17f78d9cc3d7.zip |
fix from upstream
Diffstat (limited to '4.1.1')
-rw-r--r-- | 4.1.1/gentoo/33_all_gcc4-pr22313.patch | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/4.1.1/gentoo/33_all_gcc4-pr22313.patch b/4.1.1/gentoo/33_all_gcc4-pr22313.patch new file mode 100644 index 0000000..73557ab --- /dev/null +++ b/4.1.1/gentoo/33_all_gcc4-pr22313.patch @@ -0,0 +1,56 @@ +http://bugs.gentoo.org/138173 +http://gcc.gnu.org/PR22313 + +2006-09-01 Roger Sayle <roger@eyesopen.com> + + PR other/22313 + * dwarf2out.c (add_fde_cfi): Use a set_loc if the current label is + NULL, otherwise use an advance_loc4 to adjust relative to the + current label. + (output_cfi) <DW_CFA_set_loc>: Update the current label. + (dwarf2out_switch_text_section): Reset the current label to avoid + using advance_loc4 over section boundaries. + +--- branches/gcc-4_1-branch/gcc/dwarf2out.c 2006/09/01 15:38:00 116627 ++++ branches/gcc-4_1-branch/gcc/dwarf2out.c 2006/09/01 15:47:29 116628 +@@ -656,13 +656,19 @@ + { + dw_cfi_ref xcfi; + +- fde->dw_fde_current_label = label = xstrdup (label); ++ label = xstrdup (label); + + /* Set the location counter to the new label. */ + xcfi = new_cfi (); +- xcfi->dw_cfi_opc = DW_CFA_advance_loc4; ++ /* If we have a current label, advance from there, otherwise ++ set the location directly using set_loc. */ ++ xcfi->dw_cfi_opc = fde->dw_fde_current_label ++ ? DW_CFA_advance_loc4 ++ : DW_CFA_set_loc; + xcfi->dw_cfi_oprnd1.dw_cfi_addr = label; + add_cfi (&fde->dw_fde_cfi, xcfi); ++ ++ fde->dw_fde_current_label = label; + } + + add_cfi (&fde->dw_fde_cfi, cfi); +@@ -2050,6 +2056,7 @@ + else + dw2_asm_output_addr (DWARF2_ADDR_SIZE, + cfi->dw_cfi_oprnd1.dw_cfi_addr, NULL); ++ fde->dw_fde_current_label = cfi->dw_cfi_oprnd1.dw_cfi_addr; + break; + + case DW_CFA_advance_loc1: +@@ -3934,6 +3941,10 @@ + fde->dw_fde_unlikely_section_label = cfun->cold_section_label; + fde->dw_fde_unlikely_section_end_label = cfun->cold_section_end_label; + have_switched_text_section = true; ++ ++ /* Reset the current label on switching text sections, so that we ++ don't attempt to advance_loc4 between labels in different sections. */ ++ fde->dw_fde_current_label = NULL; + } + + #endif |