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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:7232f7c4c2d727431096a7ecfcf4ad4db71dcf2a

commit r12-1702-g7232f7c4c2d727431096a7ecfcf4ad4db71dcf2a
Author: Jason Merrill <ja...@redhat.com>
Date:   Sun Jun 13 14:00:12 2021 -0400

    expand: empty class return optimization [PR88529]

    The x86_64 psABI says that an empty class isn't passed or returned in
memory
    or registers, so we shouldn't set %eax in this function.

    The df-scan hunk catches the case where we look at a 0-length reg and build
    a range the length of unsigned int, which happened before I changed
    assign_parms to match expand_function_end.

            PR target/88529

    gcc/ChangeLog:

            * df-scan.c (df_ref_record): Check that regno < endregno.
            * function.c (assign_parms, expand_function_end): Do nothing with a
            TYPE_EMPTY_P result.

    gcc/testsuite/ChangeLog:

            * g++.target/i386/empty-class1.C: New test.

Reply via email to