https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110406

--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain Buclaw <ibuc...@gcc.gnu.org>:

https://gcc.gnu.org/g:c201cd3be0d9ab887fafb0c33a9fc287c405c21c

commit r14-2169-gc201cd3be0d9ab887fafb0c33a9fc287c405c21c
Author: Iain Buclaw <ibuc...@gdcproject.org>
Date:   Wed Jun 28 18:30:31 2023 +0200

    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.

Reply via email to