Patchwork : Fix ICE by expand_expr_addr_expr_1

login
register
mail settings
Submitter Tristan Gingold
Date May 15, 2012, 8:59 a.m.
Message ID <10CC2CE0-9A73-4729-930C-0D0F62560AD9@adacore.com>
Download mbox | patch
Permalink /patch/159260/
State New
Headers show

Comments

Tristan Gingold - May 15, 2012, 8:59 a.m.
Hi,

I got ICE in plus_constant (after the assertions were added) due to expand_expr_addr_expr_1 during build on ia64/Openvms.

This function is called with TMODE == SImode (32 bit pointers) but EXP designating a variable on the frame (whose register is DImode).
Hence the ICE.

Fixed by the following patch.
No regression on x86-64 GNU/Linux.

Ok for trunk ?

Tristan.

2012-05-15  Tristan Gingold  <gingold@adacore.com>

	* expr.c (expand_expr_addr_expr_1): Call
	convert_memory_address_addr_space.
Tristan Gingold - May 29, 2012, 9:09 a.m.
Ping for:


On May 15, 2012, at 10:59 AM, Tristan Gingold wrote:

> Hi,
> 
> I got ICE in plus_constant (after the assertions were added) due to expand_expr_addr_expr_1 during build on ia64/Openvms.
> 
> This function is called with TMODE == SImode (32 bit pointers) but EXP designating a variable on the frame (whose register is DImode).
> Hence the ICE.
> 
> Fixed by the following patch.
> No regression on x86-64 GNU/Linux.
> 
> Ok for trunk ?
> 
> Tristan.
> 
> 2012-05-15  Tristan Gingold  <gingold@adacore.com>
> 
> 	* expr.c (expand_expr_addr_expr_1): Call
> 	convert_memory_address_addr_space.
> 
> diff --git a/gcc/expr.c b/gcc/expr.c
> index 3edb4a2..1b0ad8d 100644
> --- a/gcc/expr.c
> +++ b/gcc/expr.c
> @@ -7600,6 +7600,7 @@ expand_expr_addr_expr_1 (tree exp, rtx target, enum machin
>       TYPE_USER_ALIGN (TREE_TYPE (inner)) = 1;
>     }
>   result = expand_expr_addr_expr_1 (inner, subtarget, tmode, modifier, as);
> +  result = convert_memory_address_addr_space (tmode, result, as);
> 
>   if (offset)
>     {
>

Patch

diff --git a/gcc/expr.c b/gcc/expr.c
index 3edb4a2..1b0ad8d 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -7600,6 +7600,7 @@  expand_expr_addr_expr_1 (tree exp, rtx target, enum machin
       TYPE_USER_ALIGN (TREE_TYPE (inner)) = 1;
     }
   result = expand_expr_addr_expr_1 (inner, subtarget, tmode, modifier, as);
+  result = convert_memory_address_addr_space (tmode, result, as);
 
   if (offset)
     {