[Ada] Crash on Indefinite_Hashed_Maps with -gnata -gnateV

Programming / Compilers / GCC - pmderodat [138bc75d-0d04-0410-961f-82ee72b054a4] - 16 July 2018 14:11 EDT

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

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.

b05ba3c5ef6 [Ada] Crash on Indefinite_Hashed_Maps with -gnata -gnateV
gcc/ada/ChangeLog | 5 ++
gcc/ada/exp_attr.adb | 39 ++++++++--
gcc/testsuite/ChangeLog | 5 ++
gcc/testsuite/gnat.dg/validity_check3.adb | 96 +++++++++++++++++++++++++
gcc/testsuite/gnat.dg/validity_check3.ads | 116 ++++++++++++++++++++++++++++++
5 files changed, 257 insertions(+), 4 deletions(-)

Upstream: gcc.gnu.org


  • Share