Fix PR rtl-optimization/88390
Sat Dec 8 11:08:00 GMT 2018
This is the failure of g++.dg/tree-prof/pr57451.C on the SPARC, caused by the
-freorder-blocks-and-partition RTL optimization. The optimization splits the
getData function into hold and cold parts, with the cold part throwing an
exception. Now the CFI for the cold part is emitted as a second, independent
FDE, although there is still a single function for the RTL machinery, so there
is specific code in dwarf2cfi to patch things up.
The problem is that it doesn't take into account the DW_CFA_GNU_window_save
operation used on the SPARC so the second FDE lacks it entirely. That's fixed
by adding a flag to dw_cfi_row to record whether the operation has been seen.
Tested on SPARC/Solaris 11, applied on the mainline.
2018-12-08 Eric Botcazou <email@example.com>
* dwarf2cfi.c (struct dw_cfi_row): Add window_save field.
(cfi_row_equal_p): Compare it.
(dwarf2out_frame_debug_cfa_window_save): Add FAKE parameter.
If FAKE is false, set window_save of the current row.
(dwarf2out_frame_debug) <REG_CFA_TOGGLE_RA_MANGLE>: Call above
function with FAKE parameter set to true.
<REG_CFA_WINDOW_SAVE>: Likewise but with FAKE parameter set to false.
(change_cfi_row): Emit a DW_CFA_GNU_window_save if necessary.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2311 bytes
Desc: not available
More information about the Gcc-patches