This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Ada] Fix front-end inlining problem with generics
- From: Geert Bosch <bosch at darwin dot gnat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 3 Dec 2001 14:08:20 -0500 (EST)
- Subject: [Ada] Fix front-end inlining problem with generics
2001-12-03 Ed Schonberg <schonber@gnat.com>
* sem_ch12.adb (Instantiate_Package_Body): Protect against double
instantiation of a body that contains an inlined body.
*** sem_ch12.adb 2001/09/25 19:00:18 1.777
--- sem_ch12.adb 2001/09/26 12:13:53 1.778
***************
*** 6476,6481 ****
--- 6476,6489 ----
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