[Ada] Crash on derived type with rep. clause and renamed discriminant

Pierre-Marie de Rodat derodat@adacore.com
Mon Jul 6 11:38:55 GMT 2020


This patch fixes a compiler abort on a declaration of subtype of a
derived type DT whose declaration renames a discriminant of its parent
type T, when there is a record representation clause for DT.

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

gcc/ada/

	* exp_ch5.adb (Find_Component): If the target type is a derived
	record type and the required component is a discriminant that is
	renamed in the derived type declaration, use the name of the
	original discriminant to locate the intended target component.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 856 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200706/b6bbed77/attachment-0001.bin>


More information about the Gcc-patches mailing list