[Ada] Crash on inherited component in type extension in generic unit.

Pierre-Marie de Rodat derodat@adacore.com
Wed Apr 28 09:41:39 GMT 2021


Compiler aborts on an instance body that has a reference to a selected
component of a local type extension, when the component is inherited
from an ancestor type declared outside of the generic being
instantiated.

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

gcc/ada/

	* exp_ch3.adb (Expand_Record_Extension): Set Parent_Subtype on
	the type extension when within a generic unit, even though
	expansion is disabled, to allow for proper resolution of
	selected components inherited from an ancestor.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 827 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210428/eb27e931/attachment-0001.bin>


More information about the Gcc-patches mailing list