d: Fix assignment to anonymous union member corrupts sibling members in struct
authorIain Buclaw <ibuclaw@gdcproject.org>
Mon, 16 Mar 2020 22:53:20 +0000 (23:53 +0100)
committerIain Buclaw <ibuclaw@gdcproject.org>
Mon, 16 Mar 2020 22:56:38 +0000 (23:56 +0100)
commit2691ffe6dbaffb704593dd6220178c28848b3855
tree6bb3b115d089bfd0e1c6a6f2dd778cd75c4ca4b7
parentc62f5e6e1f457462b1cea74792833821bbea64bb
d: Fix assignment to anonymous union member corrupts sibling members in struct

gcc/d/ChangeLog:

PR d/92309
* types.cc (fixup_anonymous_offset): Don't set DECL_FIELD_OFFSET on
anonymous fields.

gcc/testsuite/ChangeLog:

PR d/92309
* gdc.dg/pr92309.d: New test.
gcc/d/ChangeLog
gcc/d/types.cc
gcc/testsuite/ChangeLog
gcc/testsuite/gdc.dg/pr92309.d [new file with mode: 0644]