This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug testsuite/32038] New: gfortran.dg/pr25603.f is invalid code
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 May 2007 11:18:15 -0000
- Subject: [Bug testsuite/32038] New: gfortran.dg/pr25603.f is invalid code
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The testcase gfortran.dg/pr25603.f is invalid code. The following variables are
not initialized:
lhelpa lhelp lcn lbn lan ldcdy ldcdx lkm ltm lvg lug lvm lum lhvar lzet ldep
lvdep ltstr lustr lobuk ltavr lsteph lhmix lz0 lelevy lelevx lelev ldkzh
ldkzm
lq lpstep lpi lwz lvstep lvy lustep lux ltstep lpot lcstep lc
They should be initialized with a value (like 1) if the test is to be run,
otherwise we access array elements out of range. I suggest the following patch
be applied:
Index: gcc/testsuite/gfortran.dg/pr25603.f
===================================================================
--- gcc/testsuite/gfortran.dg/pr25603.f (revision 124903)
+++ gcc/testsuite/gfortran.dg/pr25603.f (working copy)
@@ -44,6 +44,48 @@ C
call abort
endif
+ LHELPA = 1
+ LHELP = 1
+ LCN = 1
+ LBN = 1
+ LAN = 1
+ LDCDY = 1
+ LDCDX = 1
+ LKM = 1
+ LTM = 1
+ LVG = 1
+ LUG = 1
+ LVM = 1
+ LUM = 1
+ LHVAR = 1
+ LZET = 1
+ LDEP = 1
+ LVDEP = 1
+ LTSTR = 1
+ LUSTR = 1
+ LOBUK = 1
+ LTAVR = 1
+ LSTEPH = 1
+ LHMIX = 1
+ LZ0 = 1
+ LELEVY = 1
+ LELEVX = 1
+ LELEV = 1
+ LDKZH = 1
+ LDKZM = 1
+ LQ = 1
+ LPSTEP = 1
+ LPI = 1
+ LWZ = 1
+ LVSTEP = 1
+ LVY = 1
+ LUSTEP = 1
+ LUX = 1
+ LTSTEP = 1
+ LPOT = 1
+ LCSTEP = 1
+ LC = 1
+
CALL BAR2(NX,NY,NZ,NT,NTIME,NWINDX,NWINDY,NSINKS,NFILT,XSTART,
* YSTART,ZSTART,TSTART,DELTAX,DELTAY,DELTAZ,DELTAT,PHI,DL,
* DX,DY,DZ,IB,IK,ITY,NCOUNT,NPRINT,NGRAPH,NPSTEP,NGSTEP,LAST,
The initial reason I catched this is that I sometimes run the testsuite with
-fbounds-check, which fails in this case.
--
Summary: gfortran.dg/pr25603.f is invalid code
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: testsuite
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fxcoudert at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32038