------- Comment #7 from jakub at gcc dot gnu dot org 2010-08-31 19:48 ------- Created an attachment (id=21614) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21614&action=view) gcc46-pr45250.patch
The problem is that the PA backend has quite lame setup, where FRAME_POINTER_REGNUM is the same as HARD_FRAME_POINTER_REGNUM and ARG_POINTER_REGNUM, thus the replacements var-tracking is doing in order to decrease size of loclists and use DW_OP_fbreg where possible, aren't reliable, as the testcase shows, because the same hard register can be used for arbitrary other data. The following patch fixes it by not doing the replacements on PA and similar targets at all when doing VALUE based var-tracking. Ideally PA backend would be fixed up to use different (fixed) hard regno, made up and always eliminated, for FRAME_POINTER_REGNUM. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45250