http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621

Oleg Endo <olegendo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-06-10
                 CC|                            |kkojima at gcc dot gnu.org,
                   |                            |olegendo at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #2 from Oleg Endo <olegendo at gcc dot gnu.org> 2012-06-10 19:13:44 
UTC ---
(In reply to comment #1)
> Created attachment 27594 [details]
> Remove line forcing -fomit-frame-pointer on sh-elf.
> 
> The problem seems to boil down to line 750 of gcc/config/sh/sh.c (in
> sh_option_override), which sets flag_omit_frame_pointer to non-zero if the
> preferred debugging format is dwarf2 (which it is on sh-elf). It doesn't seem
> that any other targets (that I noticed) do anything similar, so it does seem a
> bit out of place to do so.
> 
> Removing that line (as the attached patch does) makes it so that
> -fno-omit-frame-pointer works as expected.

This line is related to PR 29996 and was introduced in this patch
http://gcc.gnu.org/ml/gcc-patches/2010-01/msg01147.html

I'm not sure whether removing it won't introduce some other side effects.
Maybe it should have been something like this instead?

flag_omit_frame_pointer = flag_omit_frame_pointer
                          && (PREFERRED_DEBUGGING_TYPE == DWARF2_DEBUG);

I'd like to add Kaz to the CC list.

Reply via email to