[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 gcc-bugzilla@gcc.gnu.org
Tue Jan 18 10:24:43 GMT 2022


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.


More information about the Gcc-bugs mailing list