On Fri, Jul 7, 2017 at 1:08 PM, Eric Botcazou <ebotca...@adacore.com> wrote:
> Hi,
>
> this fixes the following ICE in decode_addr_const:
>
> +===========================GNAT BUG DETECTED==============================+
> | 8.0.0 20170704 (experimental) [trunk revision 249942] (x86_64-suse-linux)
> GCC error:|
> | in decode_addr_const, at varasm.c:2880
>
> stemming from a CONSTRUCTOR containing absolute addresses hidden behind a
> COMPONENT_REF or similar references.
>
> Fixed by adding support for INDIRECT_REF <INTEGER_CST> to decode_addr_const.
>
> Tested on x86_64-suse-linux, OK for the mainline?

Apart from the MEM construction where I simply trust you this looks
ok.  Mind adding
MEM_REF support for this case as well?

Btw, why's simply output_constant_def (TREE_OPERAND (target, 0), 1);
not correct?

Isn't this about &*0x1?

Thanks,
Richard.

>
> 2017-07-07  Eric Botcazou  <ebotca...@adacore.com>
>
>         * varasm.c (decode_addr_const): Deal with INDIRECT_REF <INTEGER_CST>.
>
>
> 2017-07-07  Eric Botcazou  <ebotca...@adacore.com>
>
>         * gnat.dg/aggr22.ad[sb]: New test.
>
> --
> Eric Botcazou

Reply via email to