summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch12.adb
diff options
context:
space:
mode:
authorbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-03 19:06:53 +0000
committerbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-03 19:06:53 +0000
commit1345ea6b171c3209aaf9d4cf61a7d525631a9f90 (patch)
treeea37520a774e34b33e5ce281203a3ce42a4f650c /gcc/ada/sem_ch12.adb
parentbf6a0490a3615931f6fe35150d977a84b1f12d4d (diff)
downloadgcc-1345ea6b171c3209aaf9d4cf61a7d525631a9f90.tar.gz
* sem_ch12.adb (Instantiate_Package_Body): Protect against double
instantiation of a body that contains an inlined body. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47556 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch12.adb')
-rw-r--r--gcc/ada/sem_ch12.adb8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 20af910b814..811644d2d3c 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -6503,6 +6503,14 @@ package body Sem_Ch12 is
begin
Gen_Body_Id := Corresponding_Body (Gen_Decl);
+
+ -- The instance body may already have been processed, as the parent
+ -- of another instance that is inlined. (Load_Parent_Of_Generic).
+
+ if Present (Corresponding_Body (Instance_Spec (Inst_Node))) then
+ return;
+ end if;
+
Expander_Mode_Save_And_Set (Body_Info.Expander_Status);
if No (Gen_Body_Id) then