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/107453] [13 Regression] New stdarg tests in r13-3549-g4fe34cdcc80ac2 fail Date: Mon, 09 Jan 2023 12:37:23 +0000 [thread overview] Message-ID: <bug-107453-4-rgxnkQMLcb@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-107453-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107453 --- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:b1879fb84e78fa2c530e66de43f3dc125820864a commit r13-5067-gb1879fb84e78fa2c530e66de43f3dc125820864a Author: Jakub Jelinek <jakub@redhat.com> Date: Mon Jan 9 13:36:22 2023 +0100 calls: Fix up TYPE_NO_NAMED_ARGS_STDARG_P handling [PR107453] On powerpc64le-linux, the following patch fixes -FAIL: gcc.dg/c2x-stdarg-4.c execution test -FAIL: gcc.dg/torture/c2x-stdarg-split-1a.c -O0 execution test -FAIL: gcc.dg/torture/c2x-stdarg-split-1a.c -O1 execution test -FAIL: gcc.dg/torture/c2x-stdarg-split-1a.c -O2 execution test -FAIL: gcc.dg/torture/c2x-stdarg-split-1a.c -O2 -flto -fno-use-linker-plugin -flto-partition=none execution test -FAIL: gcc.dg/torture/c2x-stdarg-split-1a.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects execution test -FAIL: gcc.dg/torture/c2x-stdarg-split-1a.c -O3 -g execution test -FAIL: gcc.dg/torture/c2x-stdarg-split-1a.c -Os execution test The problem is mismatch between the caller and callee side. On the callee side, we do: /* NAMED_ARG is a misnomer. We really mean 'non-variadic'. */ if (!cfun->stdarg) data->arg.named = 1; /* No variadic parms. */ else if (DECL_CHAIN (parm)) data->arg.named = 1; /* Not the last non-variadic parm. */ else if (targetm.calls.strict_argument_naming (all->args_so_far)) data->arg.named = 1; /* Only variadic ones are unnamed. */ else data->arg.named = 0; /* Treat as variadic. */ which is later passed to the target hooks to determine if a particular argument is named or not. Now, cfun->stdarg is determined from the stdarg_p call, which for the new C2X TYPE_NO_NAMED_ARGS_STDARG_P function types (rettype fn (...)) returns true. Such functions have no named arguments, so data->arg.named will be 0 in function.cc. But on the caller side, as TYPE_NO_NAMED_ARGS_STDARG_P function types have TYPE_ARG_TYPES NULL, we instead treat those calls as unprototyped even when they are prototyped - /* If we know nothing, treat all args as named. */ n_named_args = num_actuals; in 2 spots. We need to treat the TYPE_NO_NAMED_ARGS_STDARG_P cases as prototyped with no named arguments. 2023-01-09 Jakub Jelinek <jakub@redhat.com> PR target/107453 * calls.cc (expand_call): For calls with TYPE_NO_NAMED_ARGS_STDARG_P (funtype) use zero for n_named_args. Formatting fix.
next prev parent reply other threads:[~2023-01-09 12:37 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-28 21:39 [Bug other/107453] New: " seurer at gcc dot gnu.org 2022-10-28 21:42 ` [Bug target/107453] " pinskia at gcc dot gnu.org 2022-10-31 17:08 ` ebotcazou at gcc dot gnu.org 2022-11-05 9:34 ` tschwinge at gcc dot gnu.org 2022-11-05 10:23 ` [Bug target/107453] [13 Regression] " rguenth at gcc dot gnu.org 2022-11-07 8:51 ` chenglulu at loongson dot cn 2023-01-06 14:00 ` jakub at gcc dot gnu.org 2023-01-09 12:37 ` cvs-commit at gcc dot gnu.org [this message] 2023-01-09 12:44 ` jakub at gcc dot gnu.org 2023-01-09 20:07 ` tschwinge at gcc dot gnu.org 2023-03-15 12:39 ` xry111 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-107453-4-rgxnkQMLcb@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: 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).