* Re: [patch] Fix failure of ACATS c52102c
[not found] <3467344.A8qgcpPzcu@polaris>
@ 2013-12-02 11:13 ` Richard Biener
2013-12-03 6:08 ` Jeff Law
1 sibling, 0 replies; 2+ messages in thread
From: Richard Biener @ 2013-12-02 11:13 UTC (permalink / raw)
To: Eric Botcazou; +Cc: GCC Patches
On Sat, Nov 30, 2013 at 6:24 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> Hi,
>
> this test started to fail very recently on 32-bit platforms with 64-bit HWI.
> Not sure exactly why, but the issue is straightforward and was latent.
>
> For the following reference, a call to ao_ref_init_from_ptr_and_size yields:
>
> (gdb) p debug_generic_expr((tree_node *) 0x7ffff6e01200)
> &a[0 ...]{lb: 4294967292 sz: 4}
> (gdb) p debug_generic_expr(size)
> 20
> (gdb) p dref
> $36 = {ref = 0x0, base = 0x7ffff6dfd260, offset = -137438953344, size = 160,
> max_size = 160, ref_alias_set = 0, base_alias_set = 0, volatile_p = false}
>
> The offset is bogus. 'a' is an array with lower bound -4 so {lb: 4294967292
> sz: 4} is actually {lb: -4 sz: 4}. The computation of the offset goes wrong
> in get_addr_base_and_unit_offset_1 because it is not done in sizetype.
>
> Fixed by copying the relevant bits from get_ref_base_and_extent, where the
> computation is correctly done in sizetype.
>
> Tested on x86_64-suse-linux, OK for the mainline?
Ok, though the whole function needs double-int-ization ...
Thanks,
Richard.
>
> 2013-11-30 Eric Botcazou <ebotcazou@adacore.com>
>
> * tree-dfa.h (get_addr_base_and_unit_offset_1) <case ARRAY_REF>: Do the
> offset computation using the precision of the index type.
>
>
> 2013-11-30 Eric Botcazou <ebotcazou@adacore.com>
>
> * gnat.dg/opt30.adb: New test.
>
>
> --
> Eric Botcazou
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] Fix failure of ACATS c52102c
[not found] <3467344.A8qgcpPzcu@polaris>
2013-12-02 11:13 ` [patch] Fix failure of ACATS c52102c Richard Biener
@ 2013-12-03 6:08 ` Jeff Law
1 sibling, 0 replies; 2+ messages in thread
From: Jeff Law @ 2013-12-03 6:08 UTC (permalink / raw)
To: Eric Botcazou, gcc-patches
On 11/30/13 10:24, Eric Botcazou wrote:
> Hi,
>
> this test started to fail very recently on 32-bit platforms with 64-bit HWI.
> Not sure exactly why, but the issue is straightforward and was latent.
>
> For the following reference, a call to ao_ref_init_from_ptr_and_size yields:
>
> (gdb) p debug_generic_expr((tree_node *) 0x7ffff6e01200)
> &a[0 ...]{lb: 4294967292 sz: 4}
> (gdb) p debug_generic_expr(size)
> 20
> (gdb) p dref
> $36 = {ref = 0x0, base = 0x7ffff6dfd260, offset = -137438953344, size = 160,
> max_size = 160, ref_alias_set = 0, base_alias_set = 0, volatile_p = false}
>
> The offset is bogus. 'a' is an array with lower bound -4 so {lb: 4294967292
> sz: 4} is actually {lb: -4 sz: 4}. The computation of the offset goes wrong
> in get_addr_base_and_unit_offset_1 because it is not done in sizetype.
>
> Fixed by copying the relevant bits from get_ref_base_and_extent, where the
> computation is correctly done in sizetype.
>
> Tested on x86_64-suse-linux, OK for the mainline?
>
>
> 2013-11-30 Eric Botcazou <ebotcazou@adacore.com>
>
> * tree-dfa.h (get_addr_base_and_unit_offset_1) <case ARRAY_REF>: Do the
> offset computation using the precision of the index type.
>
>
> 2013-11-30 Eric Botcazou <ebotcazou@adacore.com>
>
> * gnat.dg/opt30.adb: New test.
Ok.
Thanks,
Jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-03 6:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <3467344.A8qgcpPzcu@polaris>
2013-12-02 11:13 ` [patch] Fix failure of ACATS c52102c Richard Biener
2013-12-03 6:08 ` Jeff Law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).