This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, fortran] Simplify constants which come from parameter arrays
- From: Dominique d'Humières <dominiq at lps dot ens dot fr>
- To: Thomas Koenig <tkoenig at netcologne dot de>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 28 Mar 2018 17:53:22 +0200
- Subject: Re: [patch, fortran] Simplify constants which come from parameter arrays
Hi Thomas,
If I am not mistaken, the patch causes:
FAIL: gfortran.dg/pr71935.f90 -O (test for excess errors)
FAIL: gfortran.dg/substr_6.f90 -O0 execution test
FAIL: gfortran.dg/substr_6.f90 -O1 execution test
FAIL: gfortran.dg/substr_6.f90 -O2 execution test
FAIL: gfortran.dg/substr_6.f90 -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions execution test
FAIL: gfortran.dg/substr_6.f90 -O3 -g execution test
FAIL: gfortran.dg/substr_6.f90 -Os execution test
For gfortran.dg/pr71935.f90 I get two additional errors on top of the expected warnings:
/opt/gcc/_clean/gcc/testsuite/gfortran.dg/pr71935.f90:5:21:
print *, sizeof(z(3)) ! { dg-warning "is out of bounds" }
1
Warning: Array reference at (1) is out of bounds (3 > 2) in dimension 1
/opt/gcc/_clean/gcc/testsuite/gfortran.dg/pr71935.f90:5:21:
print *, sizeof(z(3)) ! { dg-warning "is out of bounds" }
1
Error: Index in dimension 1 is out of bounds at (1)
/opt/gcc/_clean/gcc/testsuite/gfortran.dg/pr71935.f90:6:23:
print *, c_sizeof(z(3)) ! { dg-warning "is out of bounds" }
1
Warning: Array reference at (1) is out of bounds (3 > 2) in dimension 1
/opt/gcc/_clean/gcc/testsuite/gfortran.dg/pr71935.f90:6:23:
print *, c_sizeof(z(3)) ! { dg-warning "is out of bounds" }
1
Error: Index in dimension 1 is out of bounds at (1)
For gfortran.dg/substr_6.f90, I reach STOP 1 when running the executable.
TIA
Dominique