[Ada] Infinite loop with concatenation and aspect
authorBob Duff <duff@adacore.com>
Thu, 19 Sep 2019 08:12:56 +0000 (08:12 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 19 Sep 2019 08:12:56 +0000 (08:12 +0000)
commit682c09cebada73fb80e3a36fec6a3b1a09c5781e
tree0f23c5e9c42004ce66fece6ad3975009a5bee5cf
parent348c3ae62ec5579323defd9179aa6b870e0b744b
[Ada] Infinite loop with concatenation and aspect

This patch fixes a bug where an array object initialized with a
concatenation, and that has an aspect_specification for Alignment,
causes the compiler goes into an infinite loop.

2019-09-19  Bob Duff  <duff@adacore.com>

gcc/ada/

* exp_ch3.adb (Rewrite_As_Renaming): Return False if there are
any aspect specifications, because otherwise Insert_Actions
blows up.

gcc/testsuite/

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

From-SVN: r275934
gcc/ada/ChangeLog
gcc/ada/exp_ch3.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/concat3.adb [new file with mode: 0644]