aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorThomas Quinot <quinot@adacore.com>2013-01-02 09:24:58 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2013-01-02 10:24:58 +0100
commit8f252d27b1a28de7b0df05cd0caf826e223ffa43 (patch)
treeb8fb011a72733bc5f7f95c3ff4f3c8d8186ae755 /gcc
parente0d7fe6dc7cd55a725891db4073df5d514e6d196 (diff)
downloadgcc-8f252d27b1a28de7b0df05cd0caf826e223ffa43.zip
gcc-8f252d27b1a28de7b0df05cd0caf826e223ffa43.tar.gz
gcc-8f252d27b1a28de7b0df05cd0caf826e223ffa43.tar.bz2
scos.ads (In_Decision): Add missing entry for 'a'.
2013-01-02 Thomas Quinot <quinot@adacore.com> * scos.ads (In_Decision): Add missing entry for 'a'. * sem_prag.adb (Analyze_Pragma, case pragma Check): Omit call to Set_SCO_Pragma_Enabled for Invariant and Predicate. * sem_ch13.adb: Minor comment update. From-SVN: r194777
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog7
-rw-r--r--gcc/ada/scos.ads4
-rw-r--r--gcc/ada/sem_ch13.adb3
-rw-r--r--gcc/ada/sem_prag.adb33
4 files changed, 34 insertions, 13 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 2bb659a..d9e57fe 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,10 @@
+2013-01-02 Thomas Quinot <quinot@adacore.com>
+
+ * scos.ads (In_Decision): Add missing entry for 'a'.
+ * sem_prag.adb (Analyze_Pragma, case pragma Check): Omit
+ call to Set_SCO_Pragma_Enabled for Invariant and Predicate.
+ * sem_ch13.adb: Minor comment update.
+
2012-12-21 Ed Schonberg <schonberg@adacore.com>
PR ada/53737
diff --git a/gcc/ada/scos.ads b/gcc/ada/scos.ads
index 0082099..dc4248e 100644
--- a/gcc/ada/scos.ads
+++ b/gcc/ada/scos.ads
@@ -385,8 +385,8 @@ package SCOs is
Table_Increment => 300);
Is_Decision : constant array (Character) of Boolean :=
- ('E' | 'G' | 'I' | 'P' | 'A' | 'W' | 'X' => True,
- others => False);
+ ('E' | 'G' | 'I' | 'P' | 'a' | 'A' | 'W' | 'X' => True,
+ others => False);
-- Indicates which C1 values correspond to decisions
-- The SCO_Table_Entry values appear as follows:
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index eee75d5..38be20c 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -5229,8 +5229,7 @@ package body Sem_Ch13 is
Exp := New_Copy_Tree (Arg2);
- -- Preserve sloc of original pragma Invariant (this is required
- -- by Par_SCO).
+ -- Preserve sloc of original pragma Invariant
Loc := Sloc (Ritem);
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index b44df5a..e405c3d 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -2233,7 +2233,7 @@ package body Sem_Prag is
(Get_Pragma_Arg (Arg2), Standard_String);
end if;
- -- For a pragma in the extended main source unit, record enabled
+ -- For a pragma PPC in the extended main source unit, record enabled
-- status in SCO.
-- This may seem redundant with the call to Check_Enabled occurring
@@ -7449,8 +7449,9 @@ package body Sem_Prag is
-- [,[Message =>] String_EXPRESSION]);
when Pragma_Check => Check : declare
- Expr : Node_Id;
- Eloc : Source_Ptr;
+ Expr : Node_Id;
+ Eloc : Source_Ptr;
+ Cname : Name_Id;
Check_On : Boolean;
-- Set True if category of assertions referenced by Name enabled
@@ -7477,14 +7478,28 @@ package body Sem_Prag is
return;
end if;
- -- Indicate if pragma is enabled. The Original_Node reference here
- -- is to deal with pragma Assert rewritten as a Check pragma.
+ Cname := Chars (Get_Pragma_Arg (Arg1));
+ Check_On := Check_Enabled (Cname);
- Check_On := Check_Enabled (Chars (Get_Pragma_Arg (Arg1)));
+ case Cname is
+ when Name_Predicate |
+ Name_Invariant =>
- if Check_On and then not Split_PPC (N) then
- Set_SCO_Pragma_Enabled (Loc);
- end if;
+ -- Nothing to do: since checks occur in client units,
+ -- the SCO for the aspect in the declaration unit is
+ -- conservatively always enabled.
+
+ null;
+
+ when others =>
+
+ if Check_On and then not Split_PPC (N) then
+
+ -- Mark pragma/aspect SCO as enabled
+
+ Set_SCO_Pragma_Enabled (Loc);
+ end if;
+ end case;
-- If expansion is active and the check is not enabled then we
-- rewrite the Check as: