summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch8.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-04-10 18:03:58 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-04-10 18:03:58 +0200
commitb0d3b11d8c1b75fd46510845e2b352e8a22e1e9d (patch)
tree9c46971d706cd103c0b864242794df7401ef4860 /gcc/ada/sem_ch8.adb
parent1147c7040164e56f92f8f692d548049ec68189fe (diff)
downloadgcc-b0d3b11d8c1b75fd46510845e2b352e8a22e1e9d.tar.gz
[multiple changes]
2009-04-10 Robert Dewar <dewar@adacore.com> * sem_warn.ads, sem_warn.adb (Check_Low_Bound_Tested): Catch more cases for warning suppression. 2009-04-10 Ed Schonberg <schonberg@adacore.com> * sem_ch8.adb (Use_One_Type): If the two use_type clauses are identical, there is no redudancy to check. 2009-04-10 Gary Dismukes <dismukes@adacore.com> * exp_ch5.adb (Expand_N_Extended_Return_Statement): Delete redundant calls initializing SS_Allocator (which is initialized in following code). (Expand_Simple_Function_Return): Add comment about False value for Comes_From_Source on secondary-stack allocator. * exp_ch9.adb (Build_Entry_Family_Name): Add comment. (Build_Entry_Name): Add comment. From-SVN: r145926
Diffstat (limited to 'gcc/ada/sem_ch8.adb')
-rw-r--r--gcc/ada/sem_ch8.adb9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index 52f185531d5..a912fef80b1 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -7219,6 +7219,15 @@ package body Sem_Ch8 is
and then
Nkind (Parent (Clause2)) = N_Compilation_Unit
then
+
+ -- If the unit is a subprogram body that acts as spec,
+ -- the context clause is shared with the constructed
+ -- subprogram spec. Clearly there is no redundancy.
+
+ if Clause1 = Clause2 then
+ return;
+ end if;
+
Unit1 := Unit (Parent (Clause1));
Unit2 := Unit (Parent (Clause2));