[Ada] Wrong handling of address clause for limited record type
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 26 Sep 2018 09:16:49 +0000 (09:16 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Wed, 26 Sep 2018 09:16:49 +0000 (09:16 +0000)
commit3b9d159401751981118415b472dd0bdb68e862f6
tree784b824f3eb73fef6ee98fbc3e7a2dfbfbd4f130
parent1ac984f5952c52f0f70e64f5ab7a99fa62877df7
[Ada] Wrong handling of address clause for limited record type

2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Adjust
code retrieving the address when a clause has already been
processed.
* gcc-interface/trans.c (gnat_to_gnu)
<N_Attribute_Definition_Clause>: For an object with a Freeze
node, build a meaningful expression.

gcc/testsuite/

* gnat.dg/addr12.adb, gnat.dg/addr12_a.adb,
gnat.dg/addr12_a.ads, gnat.dg/addr12_b.adb,
gnat.dg/addr12_b.ads, gnat.dg/addr12_c.ads: New testcase.

From-SVN: r264606
gcc/ada/ChangeLog
gcc/ada/gcc-interface/decl.c
gcc/ada/gcc-interface/trans.c
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/addr12.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/addr12_a.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/addr12_a.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/addr12_b.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/addr12_b.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/addr12_c.ads [new file with mode: 0644]