This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]