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

            Bug ID: 91699
           Summary: [10 Regression] Bogus warnings with -O3 -flto after
                    revision r274997
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dominiq at lps dot ens.fr
                CC: iains at gcc dot gnu.org, msebor at gcc dot gnu.org
  Target Milestone: ---

After revision r274997 I see the following failures

FAIL: gfortran.dg/argument_checking_1.f90   -g -O3 -fwhole-program -flto  (test
for excess errors)
FAIL: gfortran.dg/argument_checking_8.f90   -g -O3 -fwhole-program -flto  (test
for excess errors)
FAIL: gfortran.dg/arrayio_derived_1.f90   -g -O3 -fwhole-program -flto  (test
for excess errors)
FAIL: gfortran.dg/dtio_25.f90   -g -O3 -fwhole-program -flto  (test for excess
errors)
FAIL: gfortran.dg/dtio_28.f03   -g -O3 -fwhole-program -flto  (test for excess
errors)
FAIL: gfortran.dg/dtio_30.f03   -g -O3 -fwhole-program -flto  (test for excess
errors)
FAIL: gfortran.dg/pr39865.f90   -g -O3 -fwhole-program -flto  (test for excess
errors)

% /opt/gcc/gcc10p-274996p1/bin/gfortran
/opt/gcc/_clean/gcc/testsuite/gfortran.dg/argument_checking_1.f90 -O3 -flto
% /opt/gcc/gcc10p-274997p1/bin/gfortran
/opt/gcc/_clean/gcc/testsuite/gfortran.dg/argument_checking_1.f90 -O3 -flto
In function 'copy2',
    inlined from 'MAIN__' at
/opt/gcc/_clean/gcc/testsuite/gfortran.dg/argument_checking_1.f90:13:0,
    inlined from 'main' at
/opt/gcc/_clean/gcc/testsuite/gfortran.dg/argument_checking_1.f90:18:0:
/opt/gcc/_clean/gcc/testsuite/gfortran.dg/argument_checking_1.f90:28: warning:
writing 1 byte into a region of size 0 [-Wstringop-overflow=]
   28 |     out(1:2,1:5) = in(1:2,1:5)
      | 

Note that pr39865.f90 requires -fwhole-program in order to give the warning.

This is not fixed by the patch at
https://gcc.gnu.org/ml/gcc-patches/2019-09/msg00425.html

Reply via email to