Commit 02d54806 by Eric Botcazou Committed by Eric Botcazou

* varasm.c (decode_addr_const): Deal with INDIRECT_REF <INTEGER_CST>.

From-SVN: r251545
parent e0bd5a28
2017-08-30 Eric Botcazou <ebotcazou@adacore.com>
* varasm.c (decode_addr_const): Deal with INDIRECT_REF <INTEGER_CST>.
2017-08-30 Pat Haugen <pthaugen@us.ibm.com>
* config/rs6000/rs6000.c (rs6000_emit_prologue_move_from_cr): Rename from
......
2017-08-30 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/aggr22.ad[sb]: New test.
2017-08-30 Pat Haugen <pthaugen@us.ibm.com>
* gcc.target/powerpc/cr_shrink-wrap.c: New.
......
-- { dg-do compile }
package body Aggr22 is
type Ptr is access all Integer;
type Arr is array (Positive range <>) of Ptr;
procedure Proc is
A : Arr (1 .. 33);
begin
A := (1 => null, 2 .. 32 => My_Rec.I'Access, 33 => null);
end;
end Aggr22;
with System;
package Aggr22 is
type Rec is record
C : Character;
I : aliased Integer;
end record;
My_Rec : aliased Rec;
pragma Import (Ada, My_Rec);
for My_Rec'Address use System'To_Address (16#40086000#);
procedure Proc;
end Aggr22;
......@@ -2924,6 +2924,13 @@ decode_addr_const (tree exp, struct addr_const *value)
x = output_constant_def (target, 1);
break;
case INDIRECT_REF:
/* This deals with absolute addresses. */
offset += tree_to_shwi (TREE_OPERAND (target, 0));
x = gen_rtx_MEM (QImode,
gen_rtx_SYMBOL_REF (Pmode, "origin of addresses"));
break;
default:
gcc_unreachable ();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment