[Bug d/96153] d: struct literals have non-deterministic hash values
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Aug 26 08:04:47 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96153
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain Buclaw <ibuclaw@gcc.gnu.org>:
https://gcc.gnu.org/g:1db88844a22f75b13ced224415f645680784d354
commit r11-2864-g1db88844a22f75b13ced224415f645680784d354
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date: Tue Aug 25 11:05:57 2020 +0200
d: Fix small struct literals that have non-deterministic hash values
Same issue as the initial commit that addressed PR96153, only this time to
fix
it also for structs that are not returned in memory. Tests have been added
that triggered an assertion on x86_64, however the original test was
failing
on SPARC 64-bit targets.
gcc/d/ChangeLog:
PR d/96153
* d-codegen.cc (build_address): Create a temporary for CALL_EXPRs
returning trivial aggregates, pre-filling it with zeroes.
(build_memset_call): Use build_zero_cst if setting the entire
object.
gcc/testsuite/ChangeLog:
PR d/96153
* gdc.dg/pr96153.d: Add new tests.
More information about the Gcc-bugs
mailing list