[Ada] Fix internal error on loop over array with misaligned index

Eric Botcazou ebotcazou@adacore.com
Wed Mar 6 17:50:00 GMT 2013


This is a regression present on the mainline.  The compiler aborts on a loop 
running over an array whose index type is a misaligned scalar type at -O3.

We're just forgetting to lift the padding type around the scalar type.

Tested on x86_64-suse-linux, applied on the mainline.


2013-06-03  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (Raise_Error_to_gnu) <CE_Index_Check_Failed>:
	Record the unpadded type of the index type on the RCI stack.


2013-06-03  Eric Botcazou  <ebotcazou@adacore.com>

	* gnat.dg/loop_optimization15.ad[sb]: New test.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 588 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130306/4736ff4a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: loop_optimization15.adb
Type: text/x-adasrc
Size: 439 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130306/4736ff4a/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: loop_optimization15.ads
Type: text/x-adasrc
Size: 172 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130306/4736ff4a/attachment-0002.bin>


More information about the Gcc-patches mailing list