[Ada] Build-in-place aggregates and Address clauses
authorBob Duff <duff@adacore.com>
Wed, 23 May 2018 10:21:53 +0000 (10:21 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Wed, 23 May 2018 10:21:53 +0000 (10:21 +0000)
commit326776548e5959daf62f8583ee2356f2352452fc
tree6cc0ad0f60d5fe93ba5f79ae3bd4fc3e32ea5141
parent95872381f0e22ef13e95788e7000ae2623ed03cd
[Ada] Build-in-place aggregates and Address clauses

This patch fixes a bug in which if a limited volatile variable with
an Address aspect is initialized with a build-in-place aggregate
containing build-in-place function calls, the compiler can crash.

2018-05-23  Bob Duff  <duff@adacore.com>

gcc/ada/

* freeze.adb: (Check_Address_Clause): Deal with build-in-place
aggregates in addition to build-in-place calls.

gcc/testsuite/

* gnat.dg/addr10.adb: New testcase.

From-SVN: r260574
gcc/ada/ChangeLog
gcc/ada/freeze.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/addr10.adb [new file with mode: 0644]