[patch] Robustify get_ref_base_and_extent and friend
Eric Botcazou
ebotcazou@adacore.com
Wed May 30 17:16:00 GMT 2012
Hi,
we're having issues with get_ref_base_and_extent overflowing the offset and
thus returning bogus big negative values on 32-bit hosts. The attached patch
converts it to double ints like get_inner_reference. It also contains a small
fix for build_user_friendly_ref_for_offset that can stop if a field has again
too big an offset.
Tested on x86_64-suse-linux and i586-suse-linux, OK for mainline?
2012-05-30 Eric Botcazou <ebotcazou@adacore.com>
* tree-dfa.c (get_ref_base_and_extent): Compute the offset using
double ints throughout.
* tree-sra.c (build_user_friendly_ref_for_offset) <RECORD_TYPE>:
Check that the position of the field is representable as an integer.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-diff
Size: 9459 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120530/314c40ea/attachment.bin>
More information about the Gcc-patches
mailing list