freeze.adb (Freeze_Record_Type): For a type with reversed bit order and reversed...
authorThomas Quinot <quinot@adacore.com>
Fri, 30 Mar 2012 09:11:38 +0000 (09:11 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 30 Mar 2012 09:11:38 +0000 (11:11 +0200)
2012-03-30  Thomas Quinot  <quinot@adacore.com>

* freeze.adb (Freeze_Record_Type): For a type with reversed bit
order and reversed storage order, disable front-end relayout.

From-SVN: r185996

gcc/ada/ChangeLog
gcc/ada/freeze.adb

index 7b8832d299278fba4c872e7f400ff8a875700617..baeff680387f3d61375fa6df4ff27c9a9cd74548 100644 (file)
@@ -1,3 +1,8 @@
+2012-03-30  Thomas Quinot  <quinot@adacore.com>
+
+       * freeze.adb (Freeze_Record_Type): For a type with reversed bit
+       order and reversed storage order, disable front-end relayout.
+
 2012-03-25  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Copy
index fc7600070f7bb93186b0d52f99764cdd12fe8363..3eae40e036bd93185acd5fc9e40f99fd9287af1f 100644 (file)
@@ -2161,8 +2161,16 @@ package body Freeze is
 
             --  Here is where we do the processing for reversed bit order
 
-            else
+            elsif not Reverse_Storage_Order (Rec) then
                Adjust_Record_For_Reverse_Bit_Order (Rec);
+
+            --  Case where we have both a reverse Bit_Order and a corresponding
+            --  Scalar_Storage_Order: leave record untouched, the back-end
+            --  will take care of required layout conversions.
+
+            else
+               null;
+
             end if;
          end if;