This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Pmode/ptr_mode fix for except.c
- From: Richard Henderson <rth at redhat dot com>
- To: Eric Christopher <echristo at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 18 Sep 2002 18:15:59 -0700
- Subject: Re: [patch] Pmode/ptr_mode fix for except.c
- References: <1032394867.1748.14.camel@ghostwheel>
On Wed, Sep 18, 2002 at 05:21:07PM -0700, Eric Christopher wrote:
> - rtx addr = expand_expr (addr_tree, NULL_RTX, Pmode, 0);
> + rtx addr = expand_expr (addr_tree, NULL_RTX, ptr_mode, 0);
> +
> + if (ptr_mode != Pmode)
Not ok. Note that expand_expr isn't required to honor
the mode you give it.
Try
rtx addr = expand_expr (addr_tree, NULL_RTX, Pmode, 0);
if (GET_MODE (addr) != Pmode)
though you may have to be more clever than that for
addresses that wind up being integer constants (and
thus VOIDmode).
r~