public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/107129] New: [13 Regression] False positive -Wstringop-overflow warning with -O2 or -O3
@ 2022-10-03 10:59 daniel at constexpr dot org
  2022-10-03 11:02 ` [Bug tree-optimization/107129] [13 Regression] False positive -Wstringop-overflow warning with -O2 or -O3 since r13-137-gee1cb43bc76de800 marxin at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: daniel at constexpr dot org @ 2022-10-03 10:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107129
           Summary: [13 Regression] False positive -Wstringop-overflow
                    warning with -O2 or -O3
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: daniel at constexpr dot org
  Target Milestone: ---

Created attachment 53652
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53652&action=edit
Reduced testcase

The attached testcase produces the following warning with GCC 13.0.0 20221002
(commit 3290dcf):

$ /opt/gcc-dev/bin/c++ -O2 -c test.cpp 
test.cpp: In member function ‘void C::f()’:
test.cpp:39:33: warning: writing 1 byte into a region of size 0
[-Wstringop-overflow=]
   39 |                         c[i] = e(1.f - i, i);
      |                                ~^~~~~~~~~~~~
test.cpp:9:23: note: at offset 1 into destination object ‘C4::r’ of size 1
    9 |         unsigned char r;
      |

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug tree-optimization/107129] [13 Regression] False positive -Wstringop-overflow warning with -O2 or -O3 since r13-137-gee1cb43bc76de800
  2022-10-03 10:59 [Bug tree-optimization/107129] New: [13 Regression] False positive -Wstringop-overflow warning with -O2 or -O3 daniel at constexpr dot org
@ 2022-10-03 11:02 ` marxin at gcc dot gnu.org
  2022-10-06  6:59 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-10-03 11:02 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-10-03
            Summary|[13 Regression] False       |[13 Regression] False
                   |positive                    |positive
                   |-Wstringop-overflow warning |-Wstringop-overflow warning
                   |with -O2 or -O3             |with -O2 or -O3 since
                   |                            |r13-137-gee1cb43bc76de800
             Status|UNCONFIRMED                 |NEW
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |msebor at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r13-137-gee1cb43bc76de800.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug tree-optimization/107129] [13 Regression] False positive -Wstringop-overflow warning with -O2 or -O3 since r13-137-gee1cb43bc76de800
  2022-10-03 10:59 [Bug tree-optimization/107129] New: [13 Regression] False positive -Wstringop-overflow warning with -O2 or -O3 daniel at constexpr dot org
  2022-10-03 11:02 ` [Bug tree-optimization/107129] [13 Regression] False positive -Wstringop-overflow warning with -O2 or -O3 since r13-137-gee1cb43bc76de800 marxin at gcc dot gnu.org
@ 2022-10-06  6:59 ` rguenth at gcc dot gnu.org
  2023-01-13 11:33 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-10-06  6:59 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |88443
   Target Milestone|---                         |13.0

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
The diagnostic is done too late.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88443
[Bug 88443] [meta-bug] bogus/missing -Wstringop-overflow warnings

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug tree-optimization/107129] [13 Regression] False positive -Wstringop-overflow warning with -O2 or -O3 since r13-137-gee1cb43bc76de800
  2022-10-03 10:59 [Bug tree-optimization/107129] New: [13 Regression] False positive -Wstringop-overflow warning with -O2 or -O3 daniel at constexpr dot org
  2022-10-03 11:02 ` [Bug tree-optimization/107129] [13 Regression] False positive -Wstringop-overflow warning with -O2 or -O3 since r13-137-gee1cb43bc76de800 marxin at gcc dot gnu.org
  2022-10-06  6:59 ` rguenth at gcc dot gnu.org
@ 2023-01-13 11:33 ` rguenth at gcc dot gnu.org
  2023-01-13 12:38 ` marxin at gcc dot gnu.org
  2023-01-13 12:41 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-01-13 11:33 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |needs-bisection

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
We no longer warn, not sure what fixed it?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug tree-optimization/107129] [13 Regression] False positive -Wstringop-overflow warning with -O2 or -O3 since r13-137-gee1cb43bc76de800
  2022-10-03 10:59 [Bug tree-optimization/107129] New: [13 Regression] False positive -Wstringop-overflow warning with -O2 or -O3 daniel at constexpr dot org
                   ` (2 preceding siblings ...)
  2023-01-13 11:33 ` rguenth at gcc dot gnu.org
@ 2023-01-13 12:38 ` marxin at gcc dot gnu.org
  2023-01-13 12:41 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2023-01-13 12:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #3)
> We no longer warn, not sure what fixed it?

r13-4598-gf8d136e50e6f82cb

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug tree-optimization/107129] [13 Regression] False positive -Wstringop-overflow warning with -O2 or -O3 since r13-137-gee1cb43bc76de800
  2022-10-03 10:59 [Bug tree-optimization/107129] New: [13 Regression] False positive -Wstringop-overflow warning with -O2 or -O3 daniel at constexpr dot org
                   ` (3 preceding siblings ...)
  2023-01-13 12:38 ` marxin at gcc dot gnu.org
@ 2023-01-13 12:41 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-01-13 12:41 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Good, so fixed.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-01-13 12:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-03 10:59 [Bug tree-optimization/107129] New: [13 Regression] False positive -Wstringop-overflow warning with -O2 or -O3 daniel at constexpr dot org
2022-10-03 11:02 ` [Bug tree-optimization/107129] [13 Regression] False positive -Wstringop-overflow warning with -O2 or -O3 since r13-137-gee1cb43bc76de800 marxin at gcc dot gnu.org
2022-10-06  6:59 ` rguenth at gcc dot gnu.org
2023-01-13 11:33 ` rguenth at gcc dot gnu.org
2023-01-13 12:38 ` marxin at gcc dot gnu.org
2023-01-13 12:41 ` rguenth at gcc dot gnu.org

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).