2018-05-29 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* sem_ch3.adb: Set scope of component of subtype.
From-SVN: r260880
+2018-05-29 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb: Set scope of component of subtype.
+
2018-05-29 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Visit_Node): Exclude selected components whose prefix
Set_Comes_From_Source (New_Compon, False);
-- But it is a real entity, and a birth certificate must be properly
- -- registered by entering it into the entity list.
+ -- registered by entering it into the entity list, and setting its
+ -- scope to the given subtype. This turns out to be useful for the
+ -- LLVM code generator, but that scope is not used otherwise.
Enter_Name (New_Compon);
+ Set_Scope (New_Compon, Subt);
return New_Compon;
end Create_Component;