[Ada] Crash on deallocating component with discriminated task
authorHristian Kirtchev <kirtchev@adacore.com>
Fri, 5 Jul 2019 07:03:15 +0000 (07:03 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Fri, 5 Jul 2019 07:03:15 +0000 (07:03 +0000)
commit9880061b346330e7c986016bdec75f38659f8793
treeb1d51f2c7107ba6b077bb2d6db13ef83c56c8568
parentd90eeca129a12d2236f8625d8ea5c93826bb526f
[Ada] Crash on deallocating component with discriminated task

This patch modifies the generation of task deallocation code to examine
the underlying type for task components.

2019-07-05  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

* exp_ch7.adb (Cleanup_Record): Use the underlying type when
checking for components with tasks.

gcc/testsuite/

* gnat.dg/task3.adb, gnat.dg/task3.ads, gnat.dg/task3_pkg1.ads,
gnat.dg/task3_pkg2.ads: New testcase.

From-SVN: r273121
gcc/ada/ChangeLog
gcc/ada/exp_ch7.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/task3.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/task3.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/task3_pkg1.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/task3_pkg2.ads [new file with mode: 0644]