public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/16509] New: gfortran rejects "REAL R(2) /2*1.0/"
@ 2004-07-13 3:44 billingd at gcc dot gnu dot org
2004-07-13 4:31 ` [Bug fortran/16509] " pinskia at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: billingd at gcc dot gnu dot org @ 2004-07-13 3:44 UTC (permalink / raw)
To: gcc-bugs
The following program, derived from a case in the g77 testsuite
is accepted by g77 but not gfortran. I doubt it is standard confirming,
I looked in the Fortran 77 standard but couldn't see the construct.
Another g77 extension to support?
$ cat k.f
REAL R(2) /2*1.0/
END
$ ../gfortran -B.. -O0 -c k.f
In file k.f:1
REAL R(2) /2*1.0/
1
Error: Syntax error in data declaration at (1)
--
Summary: gfortran rejects "REAL R(2) /2*1.0/"
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: billingd at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16509
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/16509] gfortran rejects "REAL R(2) /2*1.0/"
2004-07-13 3:44 [Bug fortran/16509] New: gfortran rejects "REAL R(2) /2*1.0/" billingd at gcc dot gnu dot org
@ 2004-07-13 4:31 ` pinskia at gcc dot gnu dot org
2004-07-13 4:42 ` sgk at troutmask dot apl dot washington dot edu
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-13 4:31 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16509
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/16509] gfortran rejects "REAL R(2) /2*1.0/"
2004-07-13 3:44 [Bug fortran/16509] New: gfortran rejects "REAL R(2) /2*1.0/" billingd at gcc dot gnu dot org
2004-07-13 4:31 ` [Bug fortran/16509] " pinskia at gcc dot gnu dot org
@ 2004-07-13 4:42 ` sgk at troutmask dot apl dot washington dot edu
2004-07-13 5:09 ` david dot billinghurst at comalco dot riotinto dot com dot au
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: sgk at troutmask dot apl dot washington dot edu @ 2004-07-13 4:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From sgk at troutmask dot apl dot washington dot edu 2004-07-13 04:42 -------
G77 supports the method of enumerating the KIND of the different
data types. That is, REAL(1) is default REAL KIND or single precision
or REAL(4) in gfortran. REAL(2) is double precision or REAL(8) in
gfortran. For the REAL type, gfortran only supports REAL(4) and REAL(8),
so we can map REAL(1) an REAL(2) to the appropriate data type. Unfortunately,
we can't deal with the G77 enumeration of LOGICAL and INTEGER without a
-fkind=enumerate or -fkind=byte option.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16509
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/16509] gfortran rejects "REAL R(2) /2*1.0/"
2004-07-13 3:44 [Bug fortran/16509] New: gfortran rejects "REAL R(2) /2*1.0/" billingd at gcc dot gnu dot org
2004-07-13 4:31 ` [Bug fortran/16509] " pinskia at gcc dot gnu dot org
2004-07-13 4:42 ` sgk at troutmask dot apl dot washington dot edu
@ 2004-07-13 5:09 ` david dot billinghurst at comalco dot riotinto dot com dot au
2004-07-13 16:32 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: david dot billinghurst at comalco dot riotinto dot com dot au @ 2004-07-13 5:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From david dot billinghurst at comalco dot riotinto dot com dot au 2004-07-13 05:09 -------
Subject: RE: gfortran rejects "REAL R(2) /2*1.0/"
sgk at troutmask dot apl dot washington dot edu wrote:
> ------- Additional Comments From sgk at troutmask dot apl dot
> washington dot edu 2004-07-13 04:42 ------- G77 supports the method
> of enumerating the KIND of the different
> data types. That is, REAL(1) is default REAL KIND or single precision
> or REAL(4) in gfortran. REAL(2) is double precision or REAL(8) in
> gfortran. For the REAL type, gfortran only supports REAL(4) and
> REAL(8),
> so we can map REAL(1) an REAL(2) to the appropriate data type.
> Unfortunately,
> we can't deal with the G77 enumeration of LOGICAL and INTEGER without
> a -fkind=enumerate or -fkind=byte option.
This is a combined decalration and data statement meaning
REAL R(2)
DATA /2*1.0/
The original was more like
REAL R(19) /19*(-1)/
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16509
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/16509] gfortran rejects "REAL R(2) /2*1.0/"
2004-07-13 3:44 [Bug fortran/16509] New: gfortran rejects "REAL R(2) /2*1.0/" billingd at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-07-13 5:09 ` david dot billinghurst at comalco dot riotinto dot com dot au
@ 2004-07-13 16:32 ` pinskia at gcc dot gnu dot org
2004-07-14 1:00 ` billingd at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-13 16:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-13 16:32 -------
Confirmed, ICC 6.0 accepts this.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-07-13 16:32:13
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16509
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/16509] gfortran rejects "REAL R(2) /2*1.0/"
2004-07-13 3:44 [Bug fortran/16509] New: gfortran rejects "REAL R(2) /2*1.0/" billingd at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-07-13 16:32 ` pinskia at gcc dot gnu dot org
@ 2004-07-14 1:00 ` billingd at gcc dot gnu dot org
2004-07-14 3:21 ` bdavis at gcc dot gnu dot org
2004-07-14 3:23 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: billingd at gcc dot gnu dot org @ 2004-07-14 1:00 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From billingd at gcc dot gnu dot org 2004-07-14 01:00 -------
This is not (and never was) standard fortran, by my reading of:
- Fortran 77 ANSI X3.9-1978 Section 9.1
- Fortran 200x ISO/IEC FCD 1539-1:2004(E)
There are other ways to do it in F200x.
This is an extension supported by g77 and ICC. I don't use it, and
I couldn't see it documented in the g77 manual.
Someone needs to:
- decide if this "feature" is required in gfortran,
- document the decision either way.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Last reconfirmed|2004-07-13 16:32:13 |2004-07-14 01:00:43
date| |
Target Milestone|--- |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16509
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/16509] gfortran rejects "REAL R(2) /2*1.0/"
2004-07-13 3:44 [Bug fortran/16509] New: gfortran rejects "REAL R(2) /2*1.0/" billingd at gcc dot gnu dot org
` (4 preceding siblings ...)
2004-07-14 1:00 ` billingd at gcc dot gnu dot org
@ 2004-07-14 3:21 ` bdavis at gcc dot gnu dot org
2004-07-14 3:23 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: bdavis at gcc dot gnu dot org @ 2004-07-14 3:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bdavis at gcc dot gnu dot org 2004-07-14 03:21 -------
this is a dupe of 13910.
i vote for gfortran supporting this syntax. it is used widely enough to have
been reported as a bug 3 times so far. (then again I am biased, I created pr 13910:)
concur it is not standard anything,definitely an extension to the language.
--bud davis
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16509
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/16509] gfortran rejects "REAL R(2) /2*1.0/"
2004-07-13 3:44 [Bug fortran/16509] New: gfortran rejects "REAL R(2) /2*1.0/" billingd at gcc dot gnu dot org
` (5 preceding siblings ...)
2004-07-14 3:21 ` bdavis at gcc dot gnu dot org
@ 2004-07-14 3:23 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-14 3:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-14 03:23 -------
*** This bug has been marked as a duplicate of 13910 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16509
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-07-14 3:23 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-13 3:44 [Bug fortran/16509] New: gfortran rejects "REAL R(2) /2*1.0/" billingd at gcc dot gnu dot org
2004-07-13 4:31 ` [Bug fortran/16509] " pinskia at gcc dot gnu dot org
2004-07-13 4:42 ` sgk at troutmask dot apl dot washington dot edu
2004-07-13 5:09 ` david dot billinghurst at comalco dot riotinto dot com dot au
2004-07-13 16:32 ` pinskia at gcc dot gnu dot org
2004-07-14 1:00 ` billingd at gcc dot gnu dot org
2004-07-14 3:21 ` bdavis at gcc dot gnu dot org
2004-07-14 3:23 ` pinskia at gcc dot gnu dot org
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).