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 fortran/30438]  New: Unused variable should raise warning with -Wunused
Date: Thu, 11 Jan 2007 16:12:00 -0000	[thread overview]
Message-ID: <bug-30438-10259@http.gcc.gnu.org/bugzilla/> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1413 bytes --]

Just so that I don't forget, in the following code, t is set but never used:

  integer, parameter :: nconf = 4000, nmol = 300
  integer, parameter :: nhist = 200
  real, parameter :: delta = 0.05

  integer :: conf, i, cote, idO, idH1, idH2
  integer(kind=8) :: hist(2,2,nhist)
  real :: t, dist(2,3*nmol)

  open(10,file="e_dist.moy")
  open(20,file="cat_dist.moy")
  do conf = 1, nconf
    read(10,*) t, dist(1,:)
    read(20,*) t, dist(2,:)
    do i = 1, nmol
      if (dist(1,3*i-2) < dist(2,3*i-2)) then
        ! Côté électron
        cote = 1
      else
        ! Côté cation
        cote = 2
      end if
      idO  = 1 + int(dist(cote,3*i-2) / delta)
      idH1 = 1 + int(dist(cote,3*i-1) / delta)
      idH2 = 1 + int(dist(cote, 3*i ) / delta)

      if (idO <= nhist) hist(cote,1,idO) = hist(cote,1,idO) + 1_8
      if (idH1 <= nhist) hist(cote,2,idH1) = hist(cote,2,idH1) + 1_8
      if (idH2 <= nhist) hist(cote,2,idH2) = hist(cote,2,idH2) + 1_8
    end do
  end do
  close(10)
  close(20)

  end


-- 
           Summary: Unused variable should raise warning with -Wunused
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        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=30438


             reply	other threads:[~2007-01-11 16:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-11 16:12 fxcoudert at gcc dot gnu dot org [this message]
2007-01-12  6:35 ` [Bug fortran/30438] " fxcoudert at gcc dot gnu dot org
2007-01-14  5:09 ` pinskia at gcc dot gnu dot org
2007-01-15  9:15 ` aldot at gcc dot gnu dot org
2007-02-01 12:27 ` [Bug fortran/30438] Set but never used variable should raise warning fxcoudert at gcc dot gnu dot org
2007-12-14  9:11 ` aldot at gcc dot gnu dot org
2010-05-01 12:39 ` dfranke at gcc dot gnu dot org
2010-05-01 14:25 ` dfranke at gcc dot gnu dot org
2010-05-01 18:28 ` jakub 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-30438-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).