Skip to content
Snippets Groups Projects
Commit 7508a7e9 authored by Iain Buclaw's avatar Iain Buclaw
Browse files

d: Fix associative array literals that don't have alignment holes filled

Associative array literal keys with alignment holes are now filled using
memset() prior to usage, with LTR evaluation of side-effects enforced.

gcc/d/ChangeLog:

	PR d/96152
	* d-codegen.cc (build_array_from_exprs): New function.
	* d-tree.h (build_array_from_exprs): Declare.
	* expr.cc (ExprVisitor::visit (AssocArrayLiteralExp *)): Use
	build_array_from_exprs to generate key and value arrays.

gcc/testsuite/ChangeLog:

	PR d/96152
	* gdc.dg/pr96152.d: New test.
parent 873b45d3
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment