https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113109

--- Comment #13 from Jiu Fu Guo <guojiufu at gcc dot gnu.org> ---
(In reply to GCC Commits from comment #9)
> The master branch has been updated by Hans-Peter Nilsson <h...@gcc.gnu.org>:
> 
> https://gcc.gnu.org/g:3d03630b123411340e52d05124cb0cacfa1fc8b0
> 
> commit r14-6817-g3d03630b123411340e52d05124cb0cacfa1fc8b0
> Author: Hans-Peter Nilsson <h...@axis.com>
> Date:   Sun Dec 24 00:10:32 2023 +0100
> 
>     CRIS: Fix PR middle-end/113109; "throw" failing
>     
>     TL;DR: the "dse1" pass removed the eh-return-address store.  The
>     PA also marks its EH_RETURN_HANDLER_RTX as volatile, for the same
>     reason, as does visum.  See PR32769 - it's the same thing on PA.
>     
>     Conceptually, it's logical that stores to incoming args are
>     optimized out on the return path or if no loads are seen -
>     at least before epilogue expansion, when the subsequent load
>     isn't seen in the RTL, as is the case for the "dse1" pass.

The stores to the argp/frame can be eliminated only if they are not used.
While for this case, the store may be used by EH handler, it should not be
optimized out. 

Thanks for catching and handling this quickly.

Happy holidays.

Reply via email to