[Ada] Reduce emitted code size in CCG for aggregate assignment
authorArnaud Charlet <charlet@adacore.com>
Thu, 4 Jul 2019 08:05:17 +0000 (08:05 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 4 Jul 2019 08:05:17 +0000 (08:05 +0000)
2019-07-04  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

* exp_aggr.adb (Check_Component): Take into account type
conversions.

From-SVN: r273046

gcc/ada/ChangeLog
gcc/ada/exp_aggr.adb

index 789dc5da914145528229061d54b1369b9f8ccde0..4de9db792a9d8320dfd970c8cb8c93003b976e23 100644 (file)
@@ -1,3 +1,8 @@
+2019-07-04  Arnaud Charlet  <charlet@adacore.com>
+
+       * exp_aggr.adb (Check_Component): Take into account type
+       conversions.
+
 2019-07-04  Dmitriy Anisimkov  <anisimko@adacore.com>
 
        * doc/gnat_ugn/platform_specific_information.rst: Document
index b5bd2225a820238ca799bdf98a575f9b86af0da9..80523e999d30894259cb682bd2d66c41fb7d4b39 100644 (file)
@@ -5549,7 +5549,8 @@ package body Exp_Aggr is
                  or else (Nkind (Comp) = N_Selected_Component
                            and then Check_Component (Prefix (Comp)))
 
-                 or else (Nkind (Comp) = N_Unchecked_Type_Conversion
+                 or else (Nkind_In (Comp, N_Unchecked_Type_Conversion,
+                                    N_Type_Conversion)
                            and then Check_Component (Expression (Comp)));
             end Check_Component;