]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Mon, 29 Aug 2011 08:36:28 +0000 (10:36 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 29 Aug 2011 08:36:28 +0000 (10:36 +0200)
2011-08-29  Geert Bosch  <bosch@adacore.com>

* s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
instruction, as the latter may produce -0.0, which is not a valid VAX
F float number.
(Neg_G): Likewise for VAX F float.

2011-08-29  Robert Dewar  <dewar@adacore.com>

* exp_util.adb: Minor reformatting.

2011-08-29  Yannick Moy  <moy@adacore.com>

* sem_ch3.adb: Minor comment update.

2011-08-29  Thomas Quinot  <quinot@adacore.com>

* checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
the operand type.

2011-08-29  Thomas Quinot  <quinot@adacore.com>

* par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
current statement sequence on a generic instantiation or a subprogram
declaration.

From-SVN: r178161

gcc/ada/ChangeLog
gcc/ada/checks.adb
gcc/ada/exp_util.adb
gcc/ada/par_sco.adb
gcc/ada/s-vaflop-vms-alpha.adb
gcc/ada/sem_ch3.adb

index dd9bef673e279e8a071dc84f4401e9034612219c..3079b209b72de15c3faf6beb3246b70f0c0920a0 100644 (file)
@@ -1,3 +1,29 @@
+2011-08-29  Geert Bosch  <bosch@adacore.com>
+
+       * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
+       instruction, as the latter may produce -0.0, which is not a valid VAX
+       F float number.
+       (Neg_G): Likewise for VAX F float.
+
+2011-08-29  Robert Dewar  <dewar@adacore.com>
+
+       * exp_util.adb: Minor reformatting.
+
+2011-08-29  Yannick Moy  <moy@adacore.com>
+
+       * sem_ch3.adb: Minor comment update.
+
+2011-08-29  Thomas Quinot  <quinot@adacore.com>
+
+       * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
+       the operand type.
+
+2011-08-29  Thomas Quinot  <quinot@adacore.com>
+
+       * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
+       current statement sequence on a generic instantiation or a subprogram
+       declaration.
+
 2011-08-29  Robert Dewar  <dewar@adacore.com>
 
        * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
index a798e3f22fa78b53f358b60a30012e7c24e40bea..a36fedb9e26b7b4688148dcee2a6adbd89fb57ea 100644 (file)
@@ -1545,7 +1545,7 @@ package body Checks is
    --          Lo_OK be True.
    --      (3) If I'Last < 0, then let Hi be F'Succ (I'Last) and let Hi_OK
    --          be False. Otherwise let Hi be F'Pred (I'Last + 1) and let
-   --          Hi_OK be False
+   --          Hi_OK be True.
 
    procedure Apply_Float_Conversion_Check
      (Ck_Node    : Node_Id;
@@ -2325,7 +2325,10 @@ package body Checks is
       Target_Type : constant Entity_Id := Etype (N);
       Target_Base : constant Entity_Id := Base_Type (Target_Type);
       Expr        : constant Node_Id   := Expression (N);
-      Expr_Type   : constant Entity_Id := Etype (Expr);
+      Expr_Type   : constant Entity_Id := Underlying_Type (Etype (Expr));
+      --  Note: if Etype (Expr) is a private type without discriminants, its
+      --  full view might have discriminants with defaults, so we need the
+      --  full view here to retrieve the constraints.
 
    begin
       if Inside_A_Generic then
@@ -2383,7 +2386,7 @@ package body Checks is
         and then not Is_Constrained (Target_Type)
         and then Present (Stored_Constraint (Target_Type))
       then
-         --  An unconstrained derived type may have inherited discriminant
+         --  An unconstrained derived type may have inherited discriminant.
          --  Build an actual discriminant constraint list using the stored
          --  constraint, to verify that the expression of the parent type
          --  satisfies the constraints imposed by the (unconstrained!)
index 27719642e16dfb1189b429a5a6b539c61cd14783..d4f8954c3b42f403d1bc88c1219ddb495a1de723 100644 (file)
@@ -6431,12 +6431,12 @@ package body Exp_Util is
             Typ := Entity (Decl);
 
             if ((Is_Access_Type (Typ)
-                   and then not Is_Access_Subprogram_Type (Typ)
-                   and then Needs_Finalization
-                              (Available_View (Designated_Type (Typ))))
+                  and then not Is_Access_Subprogram_Type (Typ)
+                  and then Needs_Finalization
+                             (Available_View (Designated_Type (Typ))))
                  or else
-                (Is_Type (Typ)
-                   and then Needs_Finalization (Typ)))
+                   (Is_Type (Typ)
+                     and then Needs_Finalization (Typ)))
               and then Requires_Cleanup_Actions
                          (Actions (Decl), For_Package, Nested_Constructs)
             then
index d3e604685fca60c7e25b0d5106d22e29e7ea0964..a38da051d8bc7c37ac9c3fe6d7897d37169ea9d7 100644 (file)
@@ -1204,7 +1204,6 @@ package body Par_SCO is
                when N_Subprogram_Declaration =>
                   Process_Decisions_Defer
                     (Parameter_Specifications (Specification (N)), 'X');
-                  Set_Statement_Entry;
 
                --  Generic subprogram declaration
 
@@ -1213,7 +1212,6 @@ package body Par_SCO is
                     (Generic_Formal_Declarations (N), 'X');
                   Process_Decisions_Defer
                     (Parameter_Specifications (Specification (N)), 'X');
-                  Set_Statement_Entry;
 
                --  Task or subprogram body
 
index 02e4be46f0f06650582dbdb60fdb24a1b4dc7039..ba607f62d39ca36e08dcf14e5f54330cb50a56ec 100644 (file)
@@ -536,7 +536,7 @@ package body System.Vax_Float_Operations is
       C    : F;
    begin
       Asm ("ldf %0,%1", S'Asm_Output ("=f", A), F'Asm_Input ("m", X));
-      Asm ("cpysn %1,%1,%0", S'Asm_Output ("=f", B), S'Asm_Input ("f", A));
+      Asm ("subf $f31,%1,%0", S'Asm_Output ("=f", B), S'Asm_Input ("f", A));
       Asm ("stf %1,%0", F'Asm_Output ("=m", C), S'Asm_Input ("f", B));
       return C;
    end Neg_F;
@@ -550,7 +550,7 @@ package body System.Vax_Float_Operations is
       C    : G;
    begin
       Asm ("ldg %0,%1", T'Asm_Output ("=f", A), G'Asm_Input ("m", X));
-      Asm ("cpysn %1,%1,%0", T'Asm_Output ("=f", B), T'Asm_Input ("f", A));
+      Asm ("subg $f31,%1,%0", T'Asm_Output ("=f", B), T'Asm_Input ("f", A));
       Asm ("stg %1,%0", G'Asm_Output ("=m", C), T'Asm_Input ("f", B));
       return C;
    end Neg_G;
index 15f89ef894595b30dcf8adbb1141eec61ec2f139..a3f5096376b4500dab850780d35542648ee162b9 100644 (file)
@@ -4743,7 +4743,8 @@ package body Sem_Ch3 is
 
          --  In formal verification mode, create an explicit subtype for every
          --  index if not already a subtype_mark, and replace the existing type
-         --  of index by this new type. Why are we doing this ???
+         --  of index by this new type. Having a declaration for all type
+         --  entities facilitates the task of the formal verification back-end.
 
          if ALFA_Mode
            and then not Nkind_In (Index, N_Identifier, N_Expanded_Name)
@@ -4799,7 +4800,9 @@ package body Sem_Ch3 is
       if Present (Component_Typ) then
 
          --  In formal verification mode, create an explicit subtype for the
-         --  component type if not already a subtype_mark. Why do this ???
+         --  component type if not already a subtype_mark. Having a declaration
+         --  for all type entities facilitates the task of the formal
+         --  verification back-end.
 
          if ALFA_Mode
            and then Nkind (Component_Typ) = N_Subtype_Indication