]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Tue, 2 Oct 2012 08:31:49 +0000 (10:31 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 2 Oct 2012 08:31:49 +0000 (10:31 +0200)
2012-10-02  Ed Schonberg  <schonberg@adacore.com>

* exp_ch4.adb (Expand_N_Case_Expression): Do not introduce
indirections when the type of the alternatives is an access type:
more efficient, and removes anomalies when an alternative is
statically null.

2012-10-02  Robert Dewar  <dewar@adacore.com>

* aspects.ads: Minor comment addition (Invariant is a GNAT aspect).

From-SVN: r191963

gcc/ada/ChangeLog
gcc/ada/aspects.ads
gcc/ada/exp_ch4.adb

index 973833bd736ca868146c1ee2a1e0647c5e0094ab..63401fbc962f4d74c05bb593872ea0070c2f15a5 100644 (file)
@@ -1,3 +1,14 @@
+2012-10-02  Ed Schonberg  <schonberg@adacore.com>
+
+       * exp_ch4.adb (Expand_N_Case_Expression): Do not introduce
+       indirections when the type of the alternatives is an access type:
+       more efficient, and removes anomalies when an alternative is
+       statically null.
+
+2012-10-02  Robert Dewar  <dewar@adacore.com>
+
+       * aspects.ads: Minor comment addition (Invariant is a GNAT aspect).
+
 2012-10-02  Robert Dewar  <dewar@adacore.com>
 
        * exp_ch7.adb, sem_dim.adb, sem_dim.ads, prj-part.adb, checks.adb,
index 12e5e6b52c9496dce34b6885c5d90a8a61f3be66..3b4ebcedfa76d7e579c121134cc3fe2b48280cfb 100644 (file)
@@ -95,7 +95,7 @@ package Aspects is
       Aspect_Implicit_Dereference,
       Aspect_Input,
       Aspect_Interrupt_Priority,
-      Aspect_Invariant,
+      Aspect_Invariant,                     -- GNAT
       Aspect_Iterator_Element,
       Aspect_Link_Name,
       Aspect_Machine_Radix,
index c4f662446e171d15943c530b2418555e4181100a..1bb9d637f637946c5887b8ace8a6f766cac8fdd9 100644 (file)
@@ -4797,7 +4797,7 @@ package body Exp_Ch4 is
       --  wrong for unconstrained types (since the bounds may not be the
       --  same in all branches). Furthermore it involves an extra copy
       --  for large objects. So we take care of this by using the following
-      --  modified expansion for non-scalar types:
+      --  modified expansion for non-elementary types:
 
       --    do
       --       type Pnn is access all typ;
@@ -4820,7 +4820,7 @@ package body Exp_Ch4 is
 
       --  Scalar case
 
-      if Is_Scalar_Type (Typ) then
+      if Is_Elementary_Type (Typ) then
          Ttyp := Typ;
 
       else
@@ -4855,7 +4855,7 @@ package body Exp_Ch4 is
             --  As described above, take Unrestricted_Access for case of non-
             --  scalar types, to avoid big copies, and special cases.
 
-            if not Is_Scalar_Type (Typ) then
+            if not Is_Elementary_Type (Typ) then
                Aexp :=
                  Make_Attribute_Reference (Aloc,
                    Prefix         => Relocate_Node (Aexp),
@@ -4890,7 +4890,7 @@ package body Exp_Ch4 is
 
       --  Construct and return final expression with actions
 
-      if Is_Scalar_Type (Typ) then
+      if Is_Elementary_Type (Typ) then
          Fexp := New_Occurrence_Of (Tnn, Loc);
       else
          Fexp :=