diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-07 16:22:41 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-07 16:22:41 +0000 |
commit | d21d78324d2f307a79cf1b8eb7759c2d93d96744 (patch) | |
tree | e9b2f6cbd742a2692a34820f716babe65fa10464 /gcc/ada/exp_ch5.adb | |
parent | 9b57ed9f90cd5e7baf86a51bf37121361c6ac4b7 (diff) | |
download | gcc-d21d78324d2f307a79cf1b8eb7759c2d93d96744.tar.gz |
2009-04-07 Bob Duff <duff@adacore.com>
* s-secsta.ads, g-pehage.ads, s-fileio.ads: Minor comment fixes
2009-04-07 Bob Duff <duff@adacore.com>
* gnat_rm.texi, s-fileio.adb (System.File_IO.Open): New feature: A
Form parameter of Text_Translation=No allows binary mode for Text_IO
files.
* gnat_rm.texi: Document Form parameter Text_Translation=xxx.
2009-04-07 Javier Miranda <miranda@adacore.com>
* exp_ch5.adb (Expand_Assign_Array): Add implicit conversion when
processing the bounds for bit packed arrays or VM target machines.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145691 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch5.adb')
-rw-r--r-- | gcc/ada/exp_ch5.adb | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb index 4305887cff6..16cb44fad2d 100644 --- a/gcc/ada/exp_ch5.adb +++ b/gcc/ada/exp_ch5.adb @@ -851,12 +851,23 @@ package body Exp_Ch5 is -- conversions ??? else - -- Copy the bounds and reset the Analyzed flag, because the - -- bounds of the index type itself may be universal, and must - -- must be reaanalyzed to acquire the proper type for Gigi. + -- Copy the bounds Cleft_Lo := New_Copy_Tree (Left_Lo); Cright_Lo := New_Copy_Tree (Right_Lo); + + -- If the types do not match we add an implicit conversion + -- here to ensure proper match + + if Etype (Left_Lo) /= Etype (Right_Lo) then + Cright_Lo := + Unchecked_Convert_To (Etype (Left_Lo), Cright_Lo); + end if; + + -- Reset the Analyzed flag, because the bounds of the index + -- type itself may be universal, and must must be reaanalyzed + -- to acquire the proper type for the back end. + Set_Analyzed (Cleft_Lo, False); Set_Analyzed (Cright_Lo, False); |