public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Uros Bizjak <uros@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r10-10860] i386: Fix assert in ix86_function_arg [PR105970] Date: Mon, 20 Jun 2022 20:32:47 +0000 (GMT) [thread overview] Message-ID: <20220620203247.153E63841892@sourceware.org> (raw) https://gcc.gnu.org/g:570a6067ff6928fe76bb13cece38346d9a966a13 commit r10-10860-g570a6067ff6928fe76bb13cece38346d9a966a13 Author: Uros Bizjak <ubizjak@gmail.com> Date: Fri Jun 17 17:01:31 2022 +0200 i386: Fix assert in ix86_function_arg [PR105970] The mode of pointer argument should equal ptr_mode, not Pmode. 2022-06-17 Uroš Bizjak <ubizjak@gmail.com> gcc/ChangeLog: PR target/105970 * config/i386/i386.c (ix86_function_arg): Assert that the mode of pointer argumet is equal to ptr_mode, not Pmode. gcc/testsuite/ChangeLog: PR target/105970 * gcc.target/i386/pr105970.c: New test. (cherry picked from commit 1f8278bfcfc7f7157bf2b405471e67dd5097636b) Diff: --- gcc/config/i386/i386.c | 2 +- gcc/testsuite/gcc.target/i386/pr105970.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index f25acb2a9e4..80486f8f10c 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -3223,7 +3223,7 @@ ix86_function_arg (cumulative_args_t cum_v, const function_arg_info &arg) if (POINTER_TYPE_P (arg.type)) { /* This is the pointer argument. */ - gcc_assert (TYPE_MODE (arg.type) == Pmode); + gcc_assert (TYPE_MODE (arg.type) == ptr_mode); /* It is at -WORD(AP) in the current frame in interrupt and exception handlers. */ reg = plus_constant (Pmode, arg_pointer_rtx, -UNITS_PER_WORD); diff --git a/gcc/testsuite/gcc.target/i386/pr105970.c b/gcc/testsuite/gcc.target/i386/pr105970.c new file mode 100644 index 00000000000..326486faebf --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr105970.c @@ -0,0 +1,6 @@ +/* PR target/105970 */ +/* { dg-do compile { target { ! ia32 } } } */ +/* { dg-require-effective-target maybe_x32 } */ +/* { dg-options "-mx32 -mgeneral-regs-only -maddress-mode=long" } */ + +#include "../../gcc.dg/torture/pr68037-1.c"
reply other threads:[~2022-06-20 20:32 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220620203247.153E63841892@sourceware.org \ --to=uros@gcc.gnu.org \ --cc=gcc-cvs@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: linkBe 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).