public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tim Prince <n8tm@aol.com>
To: "Vardhan, Sundara (GE Infra, Energy)" <sundara.vardhan@ge.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Using Optimization flag in Fortran
Date: Tue, 01 Dec 2009 13:53:00 -0000	[thread overview]
Message-ID: <4B151FC0.6050609@aol.com> (raw)
In-Reply-To: <8E460D1B58F94945A20AA70D4D41430D0BE3CEE2@ALPMLVEM08.e2k.ad.ge.com>

Vardhan, Sundara (GE Infra, Energy) wrote:

> Recently I added the -O3 flag to compile gfortran code. The application
> uses OPEN() call to open files. These calls are made in a sequence, one
> after another to open about 4 files before any operation on any of these
> files are performed. This code works fine when compiled with no
> Optimization flags. However upon adding the Optimization flags (be it -O
> or -O3), the first OPEN() works fine and the next OPEN() call fails. I
> suspect that the optimization flag turns on some check which may be
> causing this failure. 
It looks more likely you have a bug in your program whose ill effect is 
worsened with optimization.  Perhaps you could find it by setting -O 
along with -Wall and subscript range checking.
It may also be useful to assure that you have a more stable version of 
gfortran than would be furnished by some of the "enterprise" linux distros.

  reply	other threads:[~2009-12-01 13:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-01 13:25 Vardhan, Sundara (GE Infra, Energy)
2009-12-01 13:53 ` Tim Prince [this message]
2009-12-01 15:04   ` Vardhan, Sundara (GE Infra, Energy)

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=4B151FC0.6050609@aol.com \
    --to=n8tm@aol.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=sundara.vardhan@ge.com \
    --cc=tprince@computer.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).