]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Wrong value after assignment of overlain record objects
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 Jul 2018 09:56:04 +0000 (09:56 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 Jul 2018 09:56:04 +0000 (09:56 +0000)
commit1ace4a8b0665c6b21ee3852d8c939c1edee5f90d
tree3e37d2614ba222b3374f877887dab68baff6c29a
parente79422bbe55398de3b3e2ea93e0ea7238d93985a
[Ada] Wrong value after assignment of overlain record objects

This patch corrects an issue whereby objects of a record type with a
representation clause which are overlain by address would fail to get
assigned values properly when one or both of said objects were marked
volatile.

2018-07-31  Justin Squirek  <squirek@adacore.com>

gcc/ada/

* exp_ch5.adb (Make_Field_Assign): Force temporarily generated
objects for assignment of overlaid user objects to be renamings
instead of constant declarations.

gcc/testsuite/

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263098 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/exp_ch5.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/addr11.adb [new file with mode: 0644]