public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/104088] New: [12 Regression] '-O2' (or higher) GCN offloading (only) 'libgomp.oacc-c-c++-common/vprop.c' excess errors: 'warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]'
@ 2022-01-18 10:24 tschwinge at gcc dot gnu.org
  2022-01-18 11:12 ` [Bug middle-end/104088] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2022-01-18 10:24 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104088
           Summary: [12 Regression] '-O2' (or higher) GCN offloading
                    (only) 'libgomp.oacc-c-c++-common/vprop.c' excess
                    errors: 'warning: writing 1 byte into a region of size
                    0 [-Wstringop-overflow=]'
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: diagnostic, openacc
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tschwinge at gcc dot gnu.org
                CC: ams at gcc dot gnu.org, jules at gcc dot gnu.org, msebor at gcc dot gnu.org
  Target Milestone: ---
            Target: gcn

The recent commit r12-6592-g72332337e3d8acbb21398b8d123f1bfe77a8327e "Use
enclosing object size if it's smaller than member [PR 101475]" causes a
regression with '-O2' (or higher) GCN offloading (only):

    PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/vprop.c
-DACC_DEVICE_TYPE_radeon=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa  -O0 
(test for excess errors)
    PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/vprop.c
-DACC_DEVICE_TYPE_radeon=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa  -O0 
execution test
    [-PASS:-]{+FAIL:+} libgomp.oacc-c/../libgomp.oacc-c-c++-common/vprop.c
-DACC_DEVICE_TYPE_radeon=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa  -O2 
(test for excess errors)
    PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/vprop.c
-DACC_DEVICE_TYPE_radeon=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa  -O2 
execution test

    In function 'test_char._omp_fn.0':
    lto1: warning: writing 1 byte into a region of size 0
[-Wstringop-overflow=]
    lto1: warning: writing 1 byte into a region of size 0
[-Wstringop-overflow=]

    PASS: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/vprop.c
-DACC_DEVICE_TYPE_radeon=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa  -O0 
(test for excess errors)
    PASS: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/vprop.c
-DACC_DEVICE_TYPE_radeon=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa  -O0 
execution test
    [-PASS:-]{+FAIL:+} libgomp.oacc-c++/../libgomp.oacc-c-c++-common/vprop.c
-DACC_DEVICE_TYPE_radeon=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa  -O2 
(test for excess errors)
    PASS: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/vprop.c
-DACC_DEVICE_TYPE_radeon=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa  -O2 
execution test

    In function '_Z9test_charv._omp_fn.0':
    lto1: warning: writing 1 byte into a region of size 0
[-Wstringop-overflow=]
    lto1: warning: writing 1 byte into a region of size 0
[-Wstringop-overflow=]

There is no (!) meaningful difference if good vs. bad
'-foffload=amdgcn-amdhsa=-fdump-tree-all\ -fdump-ipa-all\ -fdump-rtl-all' dump
files.

I'm happy to supply any dump files etc. to help resolve this.

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

* [Bug middle-end/104088] [12 Regression] '-O2' (or higher) GCN offloading (only) 'libgomp.oacc-c-c++-common/vprop.c' excess errors: 'warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]'
  2022-01-18 10:24 [Bug middle-end/104088] New: [12 Regression] '-O2' (or higher) GCN offloading (only) 'libgomp.oacc-c-c++-common/vprop.c' excess errors: 'warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]' tschwinge at gcc dot gnu.org
@ 2022-01-18 11:12 ` rguenth at gcc dot gnu.org
  2022-03-21 15:54 ` tschwinge at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-18 11:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0

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

* [Bug middle-end/104088] [12 Regression] '-O2' (or higher) GCN offloading (only) 'libgomp.oacc-c-c++-common/vprop.c' excess errors: 'warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]'
  2022-01-18 10:24 [Bug middle-end/104088] New: [12 Regression] '-O2' (or higher) GCN offloading (only) 'libgomp.oacc-c-c++-common/vprop.c' excess errors: 'warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]' tschwinge at gcc dot gnu.org
  2022-01-18 11:12 ` [Bug middle-end/104088] " rguenth at gcc dot gnu.org
@ 2022-03-21 15:54 ` tschwinge at gcc dot gnu.org
  2022-05-06  8:32 ` [Bug middle-end/104088] [12/13 " jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2022-03-21 15:54 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-03-21

--- Comment #1 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
For the record: I thought it was worth a quick try, but Jakub's recent commit
r12-7713-g32ca611c42658948f1b8883994796f35e8b4e74d "Allow (void *) 0xdeadbeef
accesses without warnings [PR99578]" does not resolve this issue here.

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

* [Bug middle-end/104088] [12/13 Regression] '-O2' (or higher) GCN offloading (only) 'libgomp.oacc-c-c++-common/vprop.c' excess errors: 'warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]'
  2022-01-18 10:24 [Bug middle-end/104088] New: [12 Regression] '-O2' (or higher) GCN offloading (only) 'libgomp.oacc-c-c++-common/vprop.c' excess errors: 'warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]' tschwinge at gcc dot gnu.org
  2022-01-18 11:12 ` [Bug middle-end/104088] " rguenth at gcc dot gnu.org
  2022-03-21 15:54 ` tschwinge at gcc dot gnu.org
@ 2022-05-06  8:32 ` jakub at gcc dot gnu.org
  2022-10-19  9:48 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-05-06  8:32 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|12.0                        |12.2

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 12.1 is being released, retargeting bugs to GCC 12.2.

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

* [Bug middle-end/104088] [12/13 Regression] '-O2' (or higher) GCN offloading (only) 'libgomp.oacc-c-c++-common/vprop.c' excess errors: 'warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]'
  2022-01-18 10:24 [Bug middle-end/104088] New: [12 Regression] '-O2' (or higher) GCN offloading (only) 'libgomp.oacc-c-c++-common/vprop.c' excess errors: 'warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]' tschwinge at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-05-06  8:32 ` [Bug middle-end/104088] [12/13 " jakub at gcc dot gnu.org
@ 2022-10-19  9:48 ` rguenth at gcc dot gnu.org
  2022-11-21 13:18 ` burnus at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-10-19  9:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Doesn't reproduce without actually doing offloading

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

* [Bug middle-end/104088] [12/13 Regression] '-O2' (or higher) GCN offloading (only) 'libgomp.oacc-c-c++-common/vprop.c' excess errors: 'warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]'
  2022-01-18 10:24 [Bug middle-end/104088] New: [12 Regression] '-O2' (or higher) GCN offloading (only) 'libgomp.oacc-c-c++-common/vprop.c' excess errors: 'warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]' tschwinge at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2022-10-19  9:48 ` rguenth at gcc dot gnu.org
@ 2022-11-21 13:18 ` burnus at gcc dot gnu.org
  2023-05-08 12:23 ` [Bug middle-end/104088] [12/13/14 " rguenth at gcc dot gnu.org
  2024-03-22 14:06 ` law at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2022-11-21 13:18 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> ---
I did have a look at this the other day. If I recall correctly, the issue was
that

  tree destsize = compute_objsize (dest, stmt, ostype, &aref, &ptr_qry);

in strlen_pass::maybe_warn_overflow (in file tree-ssa-strlen.cc) wrongly
returned 0
for a   var[i]._char_memb. Somewhere ('var'?) was a variable which did not use
the 64bit generic memory space but a 32-byte one. My feeling is that the
problem is related to having a non-generic memory space.

(Disclaimer: It was a couple of days back when I had a quick look and I might
misremember. The 'var[i]._char_memb' matches pattern wise but the name was
surely different.)

However, reading now the commit message title, quoted in comment 0 - "Use
enclosing object size if it's smaller than member" -, explains why the 1-byte
character type's length is not used even if it looks fine.

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

* [Bug middle-end/104088] [12/13/14 Regression] '-O2' (or higher) GCN offloading (only) 'libgomp.oacc-c-c++-common/vprop.c' excess errors: 'warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]'
  2022-01-18 10:24 [Bug middle-end/104088] New: [12 Regression] '-O2' (or higher) GCN offloading (only) 'libgomp.oacc-c-c++-common/vprop.c' excess errors: 'warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]' tschwinge at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2022-11-21 13:18 ` burnus at gcc dot gnu.org
@ 2023-05-08 12:23 ` rguenth at gcc dot gnu.org
  2024-03-22 14:06 ` law at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-08 12:23 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|12.3                        |12.4

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 12.3 is being released, retargeting bugs to GCC 12.4.

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

* [Bug middle-end/104088] [12/13/14 Regression] '-O2' (or higher) GCN offloading (only) 'libgomp.oacc-c-c++-common/vprop.c' excess errors: 'warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]'
  2022-01-18 10:24 [Bug middle-end/104088] New: [12 Regression] '-O2' (or higher) GCN offloading (only) 'libgomp.oacc-c-c++-common/vprop.c' excess errors: 'warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]' tschwinge at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-05-08 12:23 ` [Bug middle-end/104088] [12/13/14 " rguenth at gcc dot gnu.org
@ 2024-03-22 14:06 ` law at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: law at gcc dot gnu.org @ 2024-03-22 14:06 UTC (permalink / raw)
  To: gcc-bugs

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

Jeffrey A. Law <law at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
                 CC|                            |law at gcc dot gnu.org

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

end of thread, other threads:[~2024-03-22 14:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-18 10:24 [Bug middle-end/104088] New: [12 Regression] '-O2' (or higher) GCN offloading (only) 'libgomp.oacc-c-c++-common/vprop.c' excess errors: 'warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]' tschwinge at gcc dot gnu.org
2022-01-18 11:12 ` [Bug middle-end/104088] " rguenth at gcc dot gnu.org
2022-03-21 15:54 ` tschwinge at gcc dot gnu.org
2022-05-06  8:32 ` [Bug middle-end/104088] [12/13 " jakub at gcc dot gnu.org
2022-10-19  9:48 ` rguenth at gcc dot gnu.org
2022-11-21 13:18 ` burnus at gcc dot gnu.org
2023-05-08 12:23 ` [Bug middle-end/104088] [12/13/14 " rguenth at gcc dot gnu.org
2024-03-22 14:06 ` law 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).