[PATCH]: Set FOR_CALL parameter in the call to promote_mode for VMS

Douglas B Rupp rupp@gnat.com
Wed Jul 29 20:32:00 GMT 2009


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



More information about the Gcc-patches mailing list