public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sgk at troutmask dot apl dot washington dot edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/18026] boz initialization of REALs fails
Date: Mon, 23 Oct 2006 19:39:00 -0000	[thread overview]
Message-ID: <20061023193933.21718.qmail@sourceware.org> (raw)
In-Reply-To: <bug-18026-6318@http.gcc.gnu.org/bugzilla/>



------- Comment #13 from sgk at troutmask dot apl dot washington dot edu  2006-10-23 19:39 -------
Subject: Re:  boz initialization of REALs fails

On Mon, Oct 23, 2006 at 06:52:06PM -0000, tobias dot burnus at physik dot
fu-berlin dot de wrote:
> 
> In the Intel Fortran Compiler
>  real :: r
>  data r/some BOZ/
> gives the same result as using the Fortran 2003 statement in ifort:
>  real :: r
>  r = real(some boz)
> (At least with the "-switch fe_new_BOZ_constants".)

(1) I'd need to see an example.
(2) The 2 code examples are technically invalid F95.
(3) The first code example is invalid in F2003.

> Therefore, with Fortran 2003 BOZ support in place, implementing this in
> gfortran should then become easier. (Working around will also become easier.(

gfortran implements the F2003 intrepetation of a BOZ in a data
statement.  See the BIG comment in match_boz_constant.   What is
missing is gfortran does not retain knowledge that a BOZ was seen,
so when you hit

real r
data r/some BOZ/

the "assignment" to r does not know the value can from a BOZ.  Hence,
a warning/error can't be issued.

> (As gfortran accepts [integer] BOZ everywhere, it will also have the problem
> whether real( z'F' ) is meant as "convert integer BOZ to integer and then to
> real" or as "convert real BOZ to real". Ifort gives a default warning for both
> -stand f95 and -stand f03, treating the BOZ differently for those two cases.)

I spent a few hours on Friday night and Saturday looking at the F2003
behavior for REAL(z'f').  My first attempt to handle this failed, which
I don't understand.  I have a plan B.


-- 


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


  parent reply	other threads:[~2006-10-23 19:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-18026-6318@http.gcc.gnu.org/bugzilla/>
2006-05-12 13:05 ` guilloteau at obs dot u-bordeaux1 dot fr
2006-05-12 17:43 ` kargl at gcc dot gnu dot org
2006-10-02 11:09 ` fxcoudert at gcc dot gnu dot org
2006-10-02 16:47 ` kargl at gcc dot gnu dot org
2006-10-02 21:35 ` anlauf at gmx dot de
2006-10-03  1:48 ` sgk at troutmask dot apl dot washington dot edu
2006-10-23 17:10 ` kargl at gcc dot gnu dot org
2006-10-23 18:52 ` tobias dot burnus at physik dot fu-berlin dot de
2006-10-23 19:39 ` sgk at troutmask dot apl dot washington dot edu [this message]
2007-08-06 17:30 ` kargl at gcc dot gnu dot org
2007-08-06 17:33 ` kargl at gcc dot gnu dot org
2007-12-08 21:47 ` burnus at gcc dot gnu dot org
2007-12-08 22:09 ` burnus at gcc dot gnu dot org
     [not found] <bug-18026-4@http.gcc.gnu.org/bugzilla/>
2014-02-16 13:16 ` jackie.rosen at hushmail dot com
     [not found] <20041015213354.18026.anlauf@gmx.de>
2005-07-26 13:04 ` pinskia at gcc dot gnu dot org
2004-10-15 21:33 [Bug fortran/18026] New: gfortran: regression w.r.t. g77, lacks -ftypeless-boz anlauf at hep dot tu-darmstadt dot de
2005-03-13 19:05 ` [Bug fortran/18026] boz initialization of REALs fails tobi at gcc dot gnu dot org
2005-03-15 21:05 ` kargl 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=20061023193933.21718.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).