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]

Re: [Ada] Pragma Import on library units that are generic subprograms


> Importing generic subprograms provides a limited form of instance sharing.

The attached patchlet is required to support them on Alpha/Tru64.

Tested on i586-suse-linux, applied on the mainline.


2008-03-27  Eric Botcazou  <ebotcazou@adacore.com>

	* decl.c (gnat_to_gnu_entity) <E_Procedure>: Also set the public flag
	if the procedure is imported.


-- 
Eric Botcazou
Index: decl.c
===================================================================
--- decl.c	(revision 133594)
+++ decl.c	(working copy)
@@ -3550,7 +3550,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entit
 	tree gnu_ext_name = create_concat_name (gnat_entity, NULL);
 	Entity_Id gnat_param;
 	bool inline_flag = Is_Inlined (gnat_entity);
-	bool public_flag = Is_Public (gnat_entity);
+	bool public_flag = Is_Public (gnat_entity) || imported_p;
 	bool extern_flag
 	  = (Is_Public (gnat_entity) && !definition) || imported_p;
 	bool pure_flag = Is_Pure (gnat_entity);

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