[Ada] Propagate predicate function to a full view of a private subtype

Pierre-Marie de Rodat derodat@adacore.com
Tue Oct 20 07:23:29 GMT 2020


When the ancestor in subtype declaration is a private type, routine
Analyze_Subtype_Declaration creates private and full view, but only
the private view had Predicate_Function inherited from the ancestor.

Now also the full view has Predicate_Function inherited. This doesn't
appear to affect compilation, but fixes a crash in GNATprove, which
expects Predicate_Function to be set on both views.

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

gcc/ada/

	* sem_ch3.adb (Analyze_Subtype_Declaration): Propagate predicate
	function to full view of the created type as well, if it was
	created.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 791 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201020/b0733419/attachment-0001.bin>


More information about the Gcc-patches mailing list