aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-01-29 16:37:54 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2014-01-29 16:37:54 +0100
commitb7cb4a617fd5fd4ec69eedf3790f5c9ef836f0d7 (patch)
treeecb4a0ed4260a6765f4005605459ca34b415b40b /gcc
parent35d4d8995a18522fc25763457e7b2efbc2d05089 (diff)
downloadgcc-b7cb4a617fd5fd4ec69eedf3790f5c9ef836f0d7.zip
gcc-b7cb4a617fd5fd4ec69eedf3790f5c9ef836f0d7.tar.gz
gcc-b7cb4a617fd5fd4ec69eedf3790f5c9ef836f0d7.tar.bz2
[multiple changes]
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog15
-rw-r--r--gcc/ada/exp_ch3.adb9
-rw-r--r--gcc/ada/expander.adb5
3 files changed, 29 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 57624ea..1d0515d 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -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
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb
index d055831..3dfd390 100644
--- a/gcc/ada/exp_ch3.adb
+++ b/gcc/ada/exp_ch3.adb
@@ -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;
diff --git a/gcc/ada/expander.adb b/gcc/ada/expander.adb
index 869c16c..6ed3e63 100644
--- a/gcc/ada/expander.adb
+++ b/gcc/ada/expander.adb
@@ -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