[PATCH] Fix TLS related ICE

Richard Henderson rth@redhat.com
Tue Jul 30 09:57:00 GMT 2002


On Tue, Jul 30, 2002 at 03:47:15PM +0200, Jakub Jelinek wrote:
> +	    /* Addresses of thread local variables might result in
> +	       function calls.  */
> +	    if (TREE_CODE (args[i].tree_value) == ADDR_EXPR
> +		&& TREE_CODE (TREE_OPERAND (args[i].tree_value, 0)) == VAR_DECL
> +		&& DECL_THREAD_LOCAL (TREE_OPERAND (args[i].tree_value, 0))
> +		&& GET_CODE (args[i].value) == SYMBOL_REF)
> +	      args[i].value
> +		= memory_address (TYPE_MODE (TREE_TYPE (args[i].tree_value)),
> +				  args[i].value);

I don't like this.  Someone (expand_expr or here) should notice that
the constant isn't valid and use that to force it into a register.



r~



More information about the Gcc-patches mailing list