Bug ID 1172411
Summary gcc 10 produces bogus stringop-overflow warnings
Classification openSUSE
Product openSUSE Tumbleweed
Version Current
Hardware PowerPC-64
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component Other
Assignee screening-team-bugs@suse.de
Reporter brogers@suse.com
QA Contact qa-bugs@suse.de
Found By ---
Blocker ---

Created attachment 838431 [details]
test program demonstrating erroneous warnings

I encountered this problem when building the openSUSE qemu package on the
ppc64le architecture with the recently introduced gcc10.

I took the time to extract out the relevant code into a test.c file which
demonstrates the issue. See attached test.c source file.

For reference, here is output from executing: gcc-10 -c -Wall -O2 test.c
on a ppc64 host:

test.c: In function ���reset_tlb_mmu_ways56.constprop.isra���:
test.c:88:31: warning: writing 1 byte into a region of size 0
[-Wstringop-overflow=]
   88 |             entry[6][ei].asid = 1;
      |             ~~~~~~~~~~~~~~~~~~^~~
test.c:89:31: warning: writing 1 byte into a region of size 0
[-Wstringop-overflow=]
   89 |             entry[6][ei].attr = 3;
      |             ~~~~~~~~~~~~~~~~~~^~~
test.c:88:31: warning: writing 1 byte into a region of size 0
[-Wstringop-overflow=]
   88 |             entry[6][ei].asid = 1;
      |             ~~~~~~~~~~~~~~~~~~^~~
test.c:89:31: warning: writing 1 byte into a region of size 0
[-Wstringop-overflow=]
   89 |             entry[6][ei].attr = 3;
      |             ~~~~~~~~~~~~~~~~~~^~~
test.c:88:31: warning: writing 1 byte into a region of size 0
[-Wstringop-overflow=]
   88 |             entry[6][ei].asid = 1;
      |             ~~~~~~~~~~~~~~~~~~^~~
test.c:89:31: warning: writing 1 byte into a region of size 0
[-Wstringop-overflow=]
   89 |             entry[6][ei].attr = 3;
      |             ~~~~~~~~~~~~~~~~~~^~~
test.c:88:31: warning: writing 1 byte into a region of size 0
[-Wstringop-overflow=]
   88 |             entry[6][ei].asid = 1;
      |             ~~~~~~~~~~~~~~~~~~^~~
test.c:89:31: warning: writing 1 byte into a region of size 0
[-Wstringop-overflow=]
   89 |             entry[6][ei].attr = 3;
      |             ~~~~~~~~~~~~~~~~~~^~~
test.c:88:31: warning: writing 1 byte into a region of size 0
[-Wstringop-overflow=]
   88 |             entry[6][ei].asid = 1;
      |             ~~~~~~~~~~~~~~~~~~^~~
test.c:89:31: warning: writing 1 byte into a region of size 0
[-Wstringop-overflow=]
   89 |             entry[6][ei].attr = 3;
      |             ~~~~~~~~~~~~~~~~~~^~~
test.c:88:31: warning: writing 1 byte into a region of size 0
[-Wstringop-overflow=]
   88 |             entry[6][ei].asid = 1;
      |             ~~~~~~~~~~~~~~~~~~^~~
test.c:89:31: warning: writing 1 byte into a region of size 0
[-Wstringop-overflow=]
   89 |             entry[6][ei].attr = 3;
      |             ~~~~~~~~~~~~~~~~~~^~~
test.c:88:31: warning: writing 1 byte into a region of size 0
[-Wstringop-overflow=]
   88 |             entry[6][ei].asid = 1;
      |             ~~~~~~~~~~~~~~~~~~^~~
test.c:89:31: warning: writing 1 byte into a region of size 0
[-Wstringop-overflow=]
   89 |             entry[6][ei].attr = 3;
      |             ~~~~~~~~~~~~~~~~~~^~~


You are receiving this mail because: