public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/104789] [12 Regression] -Wstringop-overflow false positive at -O3 for an unrolled loop
Date: Wed, 09 Mar 2022 09:45:12 +0000	[thread overview]
Message-ID: <bug-104789-4-fAiGSEbyXB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-104789-4@http.gcc.gnu.org/bugzilla/>

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic,
                   |                            |missed-optimization

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think the -Wstringop-overflow warnings are prone to false positives with loop
unrolling just like the -Warray-bound warnings were which is why those were
moved to before loop optimizations.  Now all of those cases will re-appear as
-Wstringop-overflow which happens too late since the strlen pass runs quite
late.

Unrolling sometimes "speculatively" peels iterations that will be never
reachable at runtime and that we have difficulty to statically remove.  That's
simply hard to avoid.

For GCC 13 we might want to experiment with moving the strlen pass before
loop optimizations.  I'd put it somewhere inbetween PRE and the DOM preceeding
it.

  parent reply	other threads:[~2022-03-09  9:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-04 16:26 [Bug tree-optimization/104789] New: [12 Regression] New -Wstringop-overflow false positive since r12-5863-g9354a7d70caef1c9 marxin at gcc dot gnu.org
2022-03-04 16:26 ` [Bug tree-optimization/104789] " marxin at gcc dot gnu.org
2022-03-04 16:27 ` marxin at gcc dot gnu.org
2022-03-04 19:54 ` pinskia at gcc dot gnu.org
2022-03-04 19:57 ` pinskia at gcc dot gnu.org
2022-03-07 11:05 ` rverschelde at gmail dot com
2022-03-07 12:05 ` pinskia at gcc dot gnu.org
2022-03-07 12:39 ` rverschelde at gmail dot com
2022-03-07 13:30 ` rverschelde at gmail dot com
2022-03-07 18:10 ` msebor at gcc dot gnu.org
2022-03-07 18:34 ` [Bug tree-optimization/104789] [12 Regression] -Wstringop-overflow false positive at -O3 for an unrolled loop msebor at gcc dot gnu.org
2022-03-09  9:45 ` rguenth at gcc dot gnu.org [this message]
2022-03-14 17:35 ` msebor at gcc dot gnu.org
2022-05-06  8:32 ` [Bug tree-optimization/104789] [12/13 " jakub at gcc dot gnu.org
2022-07-26 12:43 ` rguenth at gcc dot gnu.org
2023-05-08 12:24 ` [Bug tree-optimization/104789] [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-104789-4-fAiGSEbyXB@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).