aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.cc
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2023-06-28 18:30:31 +0200
committerIain Buclaw <ibuclaw@gdcproject.org>2023-06-28 20:08:58 +0200
commitc201cd3be0d9ab887fafb0c33a9fc287c405c21c (patch)
treea82038c71ab2ada5777443258508eb46931b4c8d /gcc/expr.cc
parent9757e4440bd8755d327601a60a73d57d712583ed (diff)
downloadgcc-c201cd3be0d9ab887fafb0c33a9fc287c405c21c.zip
gcc-c201cd3be0d9ab887fafb0c33a9fc287c405c21c.tar.gz
gcc-c201cd3be0d9ab887fafb0c33a9fc287c405c21c.tar.bz2
d: Fix wrong code-gen when returning structs by value.
Since r13-1104, structs have have compute_record_mode called too early on them, causing them to return differently depending on the order that types are generated in, and whether there are forward references. This patch moves the call to compute_record_mode into its own function, and calls it after all fields have been given a size. PR d/106977 PR target/110406 gcc/d/ChangeLog: * types.cc (finish_aggregate_mode): New function. (finish_incomplete_fields): Call finish_aggregate_mode. (finish_aggregate_type): Replace call to compute_record_mode with finish_aggregate_mode. gcc/testsuite/ChangeLog: * gdc.dg/torture/pr110406.d: New test.
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions