diff options
author | Bob Duff <duff@adacore.com> | 2019-09-19 08:12:56 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2019-09-19 08:12:56 +0000 |
commit | 682c09cebada73fb80e3a36fec6a3b1a09c5781e (patch) | |
tree | 0f23c5e9c42004ce66fece6ad3975009a5bee5cf /gcc/testsuite | |
parent | 348c3ae62ec5579323defd9179aa6b870e0b744b (diff) | |
download | gcc-682c09cebada73fb80e3a36fec6a3b1a09c5781e.zip gcc-682c09cebada73fb80e3a36fec6a3b1a09c5781e.tar.gz gcc-682c09cebada73fb80e3a36fec6a3b1a09c5781e.tar.bz2 |
[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
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/concat3.adb | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1e02628..3755221 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-09-19 Bob Duff <duff@adacore.com> + + * gnat.dg/concat3.adb: New testcase. + 2019-09-19 Eric Botcazou <ebotcazou@adacore.com> * gnat.dg/pack26.adb: New testcase. diff --git a/gcc/testsuite/gnat.dg/concat3.adb b/gcc/testsuite/gnat.dg/concat3.adb new file mode 100644 index 0000000..b4df3fd --- /dev/null +++ b/gcc/testsuite/gnat.dg/concat3.adb @@ -0,0 +1,14 @@ +-- { dg-do run } +-- { dg-options "-g -O0 -gnata" } + +procedure Concat3 is + procedure Show_Bug (S : in String) + is + Str : constant String := S & "-" with Alignment => 4; + begin + null; + end Show_Bug; + +begin + Show_Bug ("BUG"); +end Concat3;
\ No newline at end of file |