[Ada] Crash on Indefinite_Hashed_Maps with -gnata -gnateV
This patch corrects the generation of helper functions which verify the
validity of record type scalar discriminants and scalar components when
switches -gnata (assertions enabled) and -gnateV (validity checks on
subprogram parameters) are in effect.
2018-07-16 Hristian Kirtchev <kirtchev@adacore.com>
gcc/ada/
* exp_attr.adb (Build_Record_VS_Func): Handle corner cases dealing with
class-wide types and record extensions.
gcc/testsuite/
* gnat.dg/validity_check3.adb, gnat.dg/validity_check3.ads: New
testcase.
From-SVN: r262715