diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-10-17 12:28:53 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-10-17 12:28:53 +0200 |
commit | 13b2f7fd6317e9858dcbaa3917dfc65629d6eed2 (patch) | |
tree | 838481e4a8a085857e86d1310288229c87194c20 /gcc/ada/exp_pakd.adb | |
parent | f4bed77be41f90e53463f8bf7a71ff503402a963 (diff) | |
download | gcc-13b2f7fd6317e9858dcbaa3917dfc65629d6eed2.zip gcc-13b2f7fd6317e9858dcbaa3917dfc65629d6eed2.tar.gz gcc-13b2f7fd6317e9858dcbaa3917dfc65629d6eed2.tar.bz2 |
[multiple changes]
2013-10-17 Tristan Gingold <gingold@adacore.com>
* a-exexpr-gcc.adb: Synchronize declarations of other/all others.
2013-10-17 Thomas Quinot <quinot@adacore.com>
* exp_pakd.adb: Add missing guard protecting Reverse_Storage_Order
call.
* sem_res.adb: Minor code cleanup: use named parameter association
(not positional) for Boolean parameter Sec_Stack in calls to
Establish_Transient_Scope.
From-SVN: r203746
Diffstat (limited to 'gcc/ada/exp_pakd.adb')
-rw-r--r-- | gcc/ada/exp_pakd.adb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/ada/exp_pakd.adb b/gcc/ada/exp_pakd.adb index 7a27b7a..273baf0 100644 --- a/gcc/ada/exp_pakd.adb +++ b/gcc/ada/exp_pakd.adb @@ -2135,10 +2135,16 @@ package body Exp_Pakd is -- Swap back if necessary Set_Etype (Arg, Ctyp); - if Byte_Swapped and then Reverse_Storage_Order (Ctyp) then - Arg := Byte_Swap (Arg, - Left_Justify => not Bytes_Big_Endian, - Right_Justify => False); + + if Byte_Swapped + and then (Is_Record_Type (Ctyp) or else Is_Array_Type (Ctyp)) + and then Reverse_Storage_Order (Ctyp) + then + Arg := + Byte_Swap + (Arg, + Left_Justify => not Bytes_Big_Endian, + Right_Justify => False); end if; -- We needed to analyze this before we do the unchecked convert |