public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Richard Biener <rguenth@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-1086] tree-optimization/105946 - avoid accessing excess args from uninit diag Date: Tue, 14 Jun 2022 10:53:12 +0000 (GMT) [thread overview] Message-ID: <20220614105312.D9318385AE77@sourceware.org> (raw) https://gcc.gnu.org/g:e07a876c07601e1f3a27420f7d055d20193c362c commit r13-1086-ge07a876c07601e1f3a27420f7d055d20193c362c Author: Richard Biener <rguenther@suse.de> Date: Tue Jun 14 11:10:13 2022 +0200 tree-optimization/105946 - avoid accessing excess args from uninit diag uninit diagnostics uses passing via reference and access attributes but that iterates over function type arguments which can in some cases appearantly outrun the actual arguments leading to ICEs. The following simply ignores not present arguments. 2022-06-14 Richard Biener <rguenther@suse.de> PR tree-optimization/105946 * tree-ssa-uninit.cc (maybe_warn_pass_by_reference): Do not look at arguments not specified in the function call. Diff: --- gcc/tree-ssa-uninit.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/tree-ssa-uninit.cc b/gcc/tree-ssa-uninit.cc index b48fcf1a8ba..f326f1775c0 100644 --- a/gcc/tree-ssa-uninit.cc +++ b/gcc/tree-ssa-uninit.cc @@ -797,6 +797,9 @@ maybe_warn_pass_by_reference (gcall *stmt, wlimits &wlims) { ++argno; + if (argno > nargs) + break; + if (!POINTER_TYPE_P (argtype)) continue;
reply other threads:[~2022-06-14 10:53 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=20220614105312.D9318385AE77@sourceware.org \ --to=rguenth@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).