[PATCH] Unbreak ia64 bootstrap (PR debug/45006)

Richard Henderson rth@redhat.com
Tue Jul 20 17:55:00 GMT 2010


On 07/20/2010 09:36 AM, Jakub Jelinek wrote:
> My PR45003 fix apparently broke IA-64 bootstrap, because there
> FUNCTION_DECLs have DECL_MODE DImode, while TYPE_MODE of FUNCTION_TYPE
> is TImode.  Guess that's related to fn descriptors.

How do the two modes get installed?  Because, really, these two should
match.  That this isn't the case doesn't make sense in the type model.

> Either of the hunks should fix the ICE, though without the first hunk
> we just won't be able to emit useful debug info (as ADDR_EXPR <FUNCTION_DECL>
> will return NULL on ia64 then), and without the second hunk we risk we hit
> similar ICE later on.

&function on ia64 may be resolved by ld.so.  I don't know if there's
anything particularly useful we could install here in the debug section.

> @@ -2427,7 +2430,9 @@ expand_debug_expr (tree exp)
>  	  op0 = simplify_gen_subreg (mode, op0, inner_mode,
>  				     subreg_lowpart_offset (mode,
>  							    inner_mode));
> -	else if (TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (exp, 0))))
> +	else if (TREE_CODE_CLASS (TREE_CODE (exp)) == tcc_unary
> +		 ? TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (exp, 0)))
> +		 : unsignedp)
>  	  op0 = gen_rtx_ZERO_EXTEND (mode, op0);
>  	else
>  	  op0 = gen_rtx_SIGN_EXTEND (mode, op0);

This bit certainly is ok.  We obviously don't want to look through
TREE_OPERAND when it isn't present.


r~



More information about the Gcc-patches mailing list