public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/105549] aarch64: Wrong va_arg alignment handling with packed bitfields and alignment
Date: Thu, 12 Jan 2023 13:44:36 +0000	[thread overview]
Message-ID: <bug-105549-4-i3HrU4gDXW@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105549-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Christophe Lyon <clyon@gcc.gnu.org>:

https://gcc.gnu.org/g:3df1a115be22caeab3ffe7afb12e71adb54ff132

commit r13-5123-g3df1a115be22caeab3ffe7afb12e71adb54ff132
Author: Christophe Lyon <christophe.lyon@arm.com>
Date:   Tue Jun 14 21:08:33 2022 +0000

    aarch64: fix warning emission for ABI break since GCC 9.1

    While looking at PR 105549, which is about fixing the ABI break
    introduced in GCC 9.1 in parameter alignment with bit-fields, we
    noticed that the GCC 9.1 warning is not emitted in all the cases where
    it should be.  This patch fixes that and the next patch in the series
    fixes the GCC 9.1 break.

    We split this into two patches since patch #2 introduces a new ABI
    break starting with GCC 13.1.  This way, patch #1 can be back-ported
    to release branches if needed to fix the GCC 9.1 warning issue.

    The main idea is to add a new global boolean that indicates whether
    we're expanding the start of a function, so that aarch64_layout_arg
    can emit warnings for callees as well as callers.  This removes the
    need for aarch64_function_arg_boundary to warn (with its incomplete
    information).  However, in the first patch there are still cases where
    we emit warnings were we should not; this is fixed in patch #2 where
    we can distinguish between GCC 9.1 and GCC.13.1 ABI breaks properly.

    The fix in aarch64_function_arg_boundary (replacing & with &&) looks
    like an oversight of a previous commit in this area which changed
    'abi_break' from a boolean to an integer.

    We also take the opportunity to fix the comment above
    aarch64_function_arg_alignment since the value of the abi_break
    parameter was changed in a previous commit, no longer matching the
    description.

    2022-11-28  Christophe Lyon  <christophe.lyon@arm.com>
                Richard Sandiford  <richard.sandiford@arm.com>

    gcc/ChangeLog:

            * config/aarch64/aarch64.cc (aarch64_function_arg_alignment): Fix
            comment.
            (aarch64_layout_arg): Factorize warning conditions.
            (aarch64_function_arg_boundary): Fix typo.
            * function.cc (currently_expanding_function_start): New variable.
            (expand_function_start): Handle
            currently_expanding_function_start.
            * function.h (currently_expanding_function_start): Declare.

    gcc/testsuite/ChangeLog:

            * gcc.target/aarch64/bitfield-abi-warning-align16-O2.c: New test.
            * gcc.target/aarch64/bitfield-abi-warning-align16-O2-extra.c: New
            test.
            * gcc.target/aarch64/bitfield-abi-warning-align32-O2.c: New test.
            * gcc.target/aarch64/bitfield-abi-warning-align32-O2-extra.c: New
            test.
            * gcc.target/aarch64/bitfield-abi-warning-align8-O2.c: New test.
            * gcc.target/aarch64/bitfield-abi-warning.h: New test.
            * g++.target/aarch64/bitfield-abi-warning-align16-O2.C: New test.
            * g++.target/aarch64/bitfield-abi-warning-align16-O2-extra.C: New
            test.
            * g++.target/aarch64/bitfield-abi-warning-align32-O2.C: New test.
            * g++.target/aarch64/bitfield-abi-warning-align32-O2-extra.C: New
            test.
            * g++.target/aarch64/bitfield-abi-warning-align8-O2.C: New test.
            * g++.target/aarch64/bitfield-abi-warning.h: New test.

  parent reply	other threads:[~2023-01-12 13:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10 13:26 [Bug target/105549] New: aarch64: Wrong va_arg alignment handling clyon at gcc dot gnu.org
2022-05-10 13:27 ` [Bug target/105549] " clyon at gcc dot gnu.org
2022-05-10 14:55 ` clyon at gcc dot gnu.org
2022-10-28 20:24 ` [Bug target/105549] aarch64: Wrong va_arg alignment handling with packed bitfields and alignment pinskia at gcc dot gnu.org
2023-01-12 13:44 ` cvs-commit at gcc dot gnu.org [this message]
2023-01-12 13:44 ` cvs-commit at gcc dot gnu.org
2023-01-12 13:50 ` clyon at gcc dot gnu.org
2023-01-25 14:24 ` cvs-commit at gcc dot gnu.org
2023-01-25 14:26 ` cvs-commit at gcc dot gnu.org
2023-01-25 14:28 ` cvs-commit at gcc dot gnu.org
2023-01-25 14:31 ` clyon at gcc dot gnu.org
2023-01-25 16:36 ` pinskia at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-105549-4-i3HrU4gDXW@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).