[Ada] Crash on Indefinite_Hashed_Maps with -gnata -gnateV
authorHristian Kirtchev <kirtchev@adacore.com>
Mon, 16 Jul 2018 14:11:09 +0000 (14:11 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 16 Jul 2018 14:11:09 +0000 (14:11 +0000)
commitf2f9cdad15a6eaadb93239092eb4441c535fa387
tree1a85715c539174c1bc90ded7ca4aa5838aec14b7
parent721500abf2b9d41bea8d2c91277c4ad5ab834db7
[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
gcc/ada/ChangeLog
gcc/ada/exp_attr.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/validity_check3.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/validity_check3.ads [new file with mode: 0644]