[PATCH] Fix unaligned access generated by IVOPTS
Eric Botcazou
ebotcazou@adacore.com
Fri Sep 13 15:11:00 GMT 2013
Hi,
in Ada we can have misaligned array components in record types, that is to say
object with BLKmode whose alignment is lower than that of their type. In this
case IVOPTS can generate misaligned TARGET_MEM_REFs, which will lead to an
unaligned access on strict-alignment platforms.
Tested on SPARC/Solaris, OK for the mainline?
2013-09-13 Eric Botcazou <ebotcazou@adacore.com>
* tree-ssa-loop-ivopts.c (may_be_unaligned_p): Deal with BLKmode as
the access mode.
2013-09-13 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/loop_optimization17.adb: New test.
* gnat.dg/loop_optimization17_pkg.ad[sb]: New helper.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 1617 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130913/06efd2a1/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: loop_optimization17.adb
Type: text/x-adasrc
Size: 438 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130913/06efd2a1/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: loop_optimization17_pkg.adb
Type: text/x-adasrc
Size: 135 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130913/06efd2a1/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: loop_optimization17_pkg.ads
Type: text/x-adasrc
Size: 611 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130913/06efd2a1/attachment-0003.bin>
More information about the Gcc-patches
mailing list