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] |
There are complex visibility issues when the generic is a child unit and some aspect of the generic type is declared in a parent unit of the generic. The code that handles this particular case should only be applied after a direct check for static matching has failed. The following must compile quietly. with Safa.Data; with Safa.Data.Attribute_Data_G; package Bug is type Attribute_Kind_T is array (Boolean) of Safa.Data.Attribute_Kind_T; package Data is new Safa.Data.Attribute_Data_G (Attribute_Kind_T => Attribute_Kind_T); end; with Safa.Data; generic type Attribute_Kind_T is array (Boolean) of Safa.Data.Attribute_Kind_T; package Safa.Data.Attribute_Data_G is end Safa.Data.Attribute_Data_G; package Safa.Data is type Attribute_Kind_T is (X); end Safa.Data; package Safa is end Safa; Tested on i686-pc-linux-gnu, committed on trunk 2008-08-05 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Validate_Array_Type_Instance): Only apply complex visibility check on the component type if the simple test fails.
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] |