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] Undefined symbols with pragma Initialize_Scalars


This patch modifies the generation of a constrained array subtype for an object
declaration to use an external name. This ensures that a reference to the array
subtype bounds are consistent when compiling with various switches and pragmas
such as Initialize_Scalars. No simple reproducer possible.

Tested on x86_64-pc-linux-gnu, committed on trunk

2015-11-18  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_util.adb (Expand_Subtype_From_Expr): Add new formal
	parameter Related_Id and propagate it to Make_Subtype_From_Expr.
	(Make_Subtype_From_Expr): Add new formal parameter
	Related_Id. Create external entities when requested by the caller.
	* exp_util.ads (Expand_Subtype_From_Expr): Add new formal
	parameter Related_Id. Update the comment on usage.
	(Make_Subtype_From_Expr): Add new formal parameter
	Related_Id. Update the comment on usage.
	* sem_ch3.adb (Analyze_Object_Declaration): Add local variable
	Related_Id. Generate an external constrained subtype when the
	object is a public symbol.

Attachment: difs
Description: Text document


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