This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: Set FOR_CALL parameter in the call to promote_mode for VMS
- From: Douglas B Rupp <rupp at gnat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Eric Botcazou <ebotcazou at adacore dot com>
- Date: Wed, 29 Jul 2009 11:42:59 -0700
- Subject: Re: [PATCH]: Set FOR_CALL parameter in the call to promote_mode for VMS
- References: <4A69D9FE.2090407@gnat.com> <200907291600.33285.ebotcazou@adacore.com>
While compiling the GNAT RTL for VMS a gcc_assert is triggered in
expand_expr_real_1 at line 7435
=> gcc_assert (GET_MODE (decl_rtl) == pmode);
Eric Botcazou's analysis of the bug:
-------------------------
It is given SImode in expand_one_register_var as computed by
enum machine_mode reg_mode
= promote_mode (type, DECL_MODE (decl), &unsignedp, 0);
while it is given DImode in expand_expr_real_1 as computed by
pmode = promote_mode (type, DECL_MODE (exp), &unsignedp,
(TREE_CODE (exp) == RESULT_DECL
|| TREE_CODE (exp) == PARM_DECL) ? 1 : 0);
because PROMOTE_MODE != PROMOTE_FUNCTION_MODE.
---------------------------
Patch previously submitted.
OK to commit?
--Douglas Rupp
AdaCore