This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/23585] [4.0 regression] mem_fun* code fine with -O1, bus error with -O2



------- Comment #10 from ebotcazou at gcc dot gnu dot org  2005-10-11 13:59 -------
> may_trap_p is the correct thing as it should detect this instruction as
> trapping:
>
>   /* Memory ref can trap unless it's a static var or a stack slot.  */
>      case MEM:
>        if (MEM_NOTRAP_P (x))
>          return 0;
>        return rtx_addr_can_trap_p (XEXP (x, 0));

No, it's the other way around.  The MEM is a stack slot so may_trap_p returns
0.


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]