public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/31683] bogus warnings / miscompilation
Date: Tue, 24 Apr 2007 18:58:00 -0000	[thread overview]
Message-ID: <20070424185844.17793.qmail@sourceware.org> (raw)
In-Reply-To: <bug-31683-6642@http.gcc.gnu.org/bugzilla/>



------- Comment #3 from burnus at gcc dot gnu dot org  2007-04-24 19:58 -------
> > This example is not valid. As NAG f95 claims:
> it is not supposed to be a runable example
Well, for hunting miscompilation bugs, a runable example helps.

I think there are at leastfour problems:

a) The program misses something like:
        allocate(ncoset(lb_min_set-1:lb_max_set))
        ncoset = 1
- or as you have suggested - overlap may not be PRIVATE
otherwise the program is it not valid.

b) Since the program is invalid if pad is not present, I added:
        if(.not.present(pab)) return
(similarly for force_a)

c) gfortran should detect that the local variable ncoset is never allocated -
as NAG f95 does:
Error: foo.f90, line 45: ALLOCATABLE array NCOSET used but never ALLOCATEd

d) gfortran give the wrong warning about offset.9 being uninitialized.
It is initialized if pad is present and if it isn't, this variable is not
accessed as I explicitly use: "if(.not.present(pab)) return"

For (d) I filled the middle-end PR 31688.

I still miss the place where gfortran miscompiles (if any).


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31683


  parent reply	other threads:[~2007-04-24 18:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-24 14:42 [Bug fortran/31683] New: " jv244 at cam dot ac dot uk
2007-04-24 17:47 ` [Bug fortran/31683] " burnus at gcc dot gnu dot org
2007-04-24 18:07 ` jv244 at cam dot ac dot uk
2007-04-24 18:58 ` burnus at gcc dot gnu dot org [this message]
2007-04-24 20:06 ` [Bug fortran/31683] bogus warnings with optional arguments tkoenig at gcc dot gnu dot org
2007-04-25  1:19 ` jv244 at cam dot ac dot uk
2007-04-25 18:50 ` burnus at gcc dot gnu dot org
2007-04-26  4:54 ` jv244 at cam dot ac dot uk
2007-06-20 15:20 ` jv244 at cam dot ac dot uk

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=20070424185844.17793.qmail@sourceware.org \
    --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).