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] Itype references for anonymous access return types


The anonymous access types created for return types must be elaborated in the
calling context of the function.  We force this elaboration by generating an
itype reference for the anonymous access. If the function is generic, this
type cannot be elaborated, given that the backend does not process generic
units at all.  Therefore the itype reference must not be generated if the
designated type is a generic formal type.

See gnat.dg/itype.ad[sb]

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

2009-08-17  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Access_Definition): Do not create an Itype reference for
	an anonymous access type whose designated type is generic.

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]