public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "msebor at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/102697] [12 Regression] overflow warning missing after -O2 vectorization Date: Tue, 12 Oct 2021 15:44:03 +0000 [thread overview] Message-ID: <bug-102697-4-KTCwbqxbFF@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-102697-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102697 Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[Diagnostics] overflow |[12 Regression] overflow |warning missing after O2 |warning missing after -O2 |vectorization. |vectorization Last reconfirmed| |2021-10-12 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> --- Confirmed as a false negative and a GCC 12 regression. The expected warning is based on the assumption that an unknown offset to a subobject is non-negative. This assumption is supported by the constraint that pointer arithmetic must be confined to the [sub]object the pointer points to. I.e., it's not valid to form a pointer to one subobject by adding an offset to a pointer to another [sub]object (even within the same object). The same constraint is enforced by -Warray-bounds. The missing -Wstringop-overflow is due to the hack mentioned in the following discussion: https://gcc.gnu.org/pipermail/gcc-patches/2021-September/580172.html The warning is issued from the strlen pass which runs at -O2 and above. It's still issued when -fno-tree-vectorized is specified but should be issued even with vectorization, and ideally at all optimization levels, including -O0.
next prev parent reply other threads:[~2021-10-12 15:44 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-12 2:23 [Bug middle-end/102697] New: [Diagnostics] overflow warning missing after O2 vectorization crazylht at gmail dot com 2021-10-12 7:14 ` [Bug middle-end/102697] " crazylht at gmail dot com 2021-10-12 15:44 ` msebor at gcc dot gnu.org [this message] 2021-10-12 19:14 ` [Bug middle-end/102697] [12 Regression] overflow warning missing after -O2 vectorization pinskia at gcc dot gnu.org 2021-10-20 2:13 ` cvs-commit at gcc dot gnu.org 2021-12-16 20:00 ` msebor at gcc dot gnu.org 2022-05-06 8:31 ` [Bug middle-end/102697] [12/13 " jakub at gcc dot gnu.org 2022-07-26 13:24 ` rguenth at gcc dot gnu.org 2023-05-08 12:22 ` [Bug middle-end/102697] [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-102697-4-KTCwbqxbFF@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).