public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug testsuite/32038]  New: gfortran.dg/pr25603.f is invalid code
Date: Tue, 22 May 2007 11:18:00 -0000	[thread overview]
Message-ID: <bug-32038-10259@http.gcc.gnu.org/bugzilla/> (raw)

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


             reply	other threads:[~2007-05-22 11:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-22 11:18 fxcoudert at gcc dot gnu dot org [this message]
2007-05-22 12:09 ` [Bug testsuite/32038] " fxcoudert at gcc dot gnu dot org
2007-05-24  6:03 ` jvdelisle at gcc dot gnu dot org
2007-05-24  6:31 ` fxcoudert at gcc dot gnu dot org
2007-05-24  9:57 ` fxcoudert at gcc dot gnu dot org
2007-05-24  9:57 ` fxcoudert at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-32038-10259@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).