2014-01-29 Javier Miranda <miranda@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 29 Jan 2014 15:37:54 +0000 (15:37 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 29 Jan 2014 15:37:54 +0000 (15:37 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207256 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 57624ea..1d0515d 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 d055831..3dfd390 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 869c16c..6ed3e63 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