[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Wed, 29 Jan 2014 15:37:54 +0000 (16:37 +0100)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 29 Jan 2014 15:37:54 +0000 (16:37 +0100)
2014-01-29  Javier Miranda  <miranda@adacore.com>

* exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
that checks if an interface types defines the predefined "="
function because the compiler was erroneously not generating the
predefined "=" primitive as soon as the name of some interface
primitive is "=" (formals were not checked).

2014-01-29  Ed Schonberg  <schonberg@adacore.com>

* expander.adb (Expander): In GNATprove mode, do not process
transient scopes: they are in general not created in this mode,
and an attempt to examine them will lead to constraint errors when
processing configuration pragmas that have analyzable expressions.

From-SVN: r207256

gcc/ada/ChangeLog
gcc/ada/exp_ch3.adb
gcc/ada/expander.adb

index 57624ead7c1a263f494895e00ff9643c99ac76e6..1d0515d3cbfe92ad85c3b143c95f2f3a9d615074 100644 (file)
@@ -1,3 +1,18 @@
+2014-01-29  Javier Miranda  <miranda@adacore.com>
+
+       * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
+       that checks if an interface types defines the predefined "="
+       function because the compiler was erroneously not generating the
+       predefined "=" primitive as soon as the name of some interface
+       primitive is "=" (formals were not checked).
+
+2014-01-29  Ed Schonberg  <schonberg@adacore.com>
+
+       * expander.adb (Expander): In GNATprove mode, do not process
+       transient scopes: they are in general not created in this mode,
+       and an attempt to examine them will lead to constraint errors when
+       processing configuration pragmas that have analyzable expressions.
+
 2014-01-29  Vincent Celier  <celier@adacore.com>
 
        * clean.adb (Gnatclean): Fail if main project is an aggregate
index d055831e34b8cf4ee1620ee7d813bba67104fb92..3dfd39084cd8d69ffbc2c7cbf575a2b6f589905f 100644 (file)
@@ -9642,6 +9642,15 @@ package body Exp_Ch3 is
          while Present (Prim) loop
             if Chars (Node (Prim)) = Name_Op_Eq
               and then not Is_Internal (Node (Prim))
+              and then Present (First_Entity (Node (Prim)))
+
+              --  Following tests need a comment ???
+
+              and then Present (Last_Entity (Node (Prim)))
+              and then Next_Entity (First_Entity (Node (Prim)))
+                         = Last_Entity (Node (Prim))
+              and then Etype (First_Entity (Node (Prim))) = Tag_Typ
+              and then Etype (Last_Entity (Node (Prim))) = Tag_Typ
             then
                Eq_Needed := False;
                Eq_Name := No_Name;
index 869c16c899b7f51f9e032450e147fb34a6dffabb..6ed3e63d864b9129b6ae371d0b21739ac3985779 100644 (file)
@@ -129,9 +129,14 @@ package body Expander is
             --  In GNATprove mode we only need a very limited subset of
             --  the usual expansions. This limited subset is implemented
             --  in Expand_SPARK.
+            --  Regular expansion is followed by special handling for transient
+            --  scopes for unconstrained results, etc. but this is not needed,
+            --  and in general cannot be done correctly, in this mode.
 
             if GNATprove_Mode then
                Expand_SPARK (N);
+               Set_Analyzed (N);
+               return;
 
             --  Here for normal non-SPARK mode