public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jamborm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/102513] [10/11/12 Regression] Many false positive warnings with recursive function
Date: Thu, 17 Feb 2022 15:25:41 +0000	[thread overview]
Message-ID: <bug-102513-4-VMwVck1mKs@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102513-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #11 from Martin Jambor <jamborm at gcc dot gnu.org> ---
I am very well aware that my patch was just a mitigation, not
something that would avoid the problem under all circumstances.  We
can attempt to look at array access indices during the summary
creation phase and save constraints on parameters in order to not
create the clones.  But even then, inlining and late optimizations can
expose such invalid array accesses in the clones that we still create
and that are practically impossible to know about at IPA-CP time.

It would be great if we finally invented a way to communicate to users
that a warning comes from a function specialized for a given context
or inlined at a particular point.  Then the user would see that
compiler created some dead code and might think it is stupid, but
would at least know what is going on (see PR 102061 and the discussion
in PR 60761).

Limiting cloning if we know from VR that we should, like my patch
does, is still a good thing to do, I think.

  parent reply	other threads:[~2022-02-17 15:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28  8:40 [Bug regression/102513] New: False positive -Wstringop-overflow= or -Warray-bounds warning " andreas.rheinhardt at outlook dot com
2021-11-09 18:27 ` [Bug tree-optimization/102513] [10.11.12 Regression] Many false positive warnings " msebor at gcc dot gnu.org
2021-11-16 13:09 ` [Bug tree-optimization/102513] [10/11/12 " rguenth at gcc dot gnu.org
2021-11-24  8:10 ` pinskia at gcc dot gnu.org
2022-01-20 12:05 ` jakub at gcc dot gnu.org
2022-01-20 12:26 ` jakub at gcc dot gnu.org
2022-01-20 12:45 ` jakub at gcc dot gnu.org
2022-01-20 13:58 ` jakub at gcc dot gnu.org
2022-02-06  0:37 ` fxue at os dot amperecomputing.com
2022-02-14 13:58 ` jamborm at gcc dot gnu.org
2022-02-14 18:19 ` [Bug ipa/102513] " jamborm at gcc dot gnu.org
2022-02-15  4:50 ` fxue at os dot amperecomputing.com
2022-02-17 15:25 ` jamborm at gcc dot gnu.org [this message]
2022-03-31 15:17 ` cvs-commit at gcc dot gnu.org
2022-03-31 16:37 ` jamborm at gcc dot gnu.org
2022-06-28 10:46 ` [Bug ipa/102513] [10/11/12/13 " jakub at gcc dot gnu.org
2023-07-07 10:41 ` [Bug ipa/102513] [11/12/13/14 " rguenth 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-102513-4-VMwVck1mKs@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).