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

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