public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/15031] New: [gfortran] initialization expressions impose ordering restrictions
@ 2004-04-20 21:44 Tobias dot Schlueter at physik dot uni-muenchen dot de
2004-04-20 22:32 ` [Bug fortran/15031] " pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Tobias dot Schlueter at physik dot uni-muenchen dot de @ 2004-04-20 21:44 UTC (permalink / raw)
To: gcc-bugs
SUBROUTINE a(b)
INTEGER :: c = SIZE(b)
REAL :: b(5)
END SUBROUTINE
gives an error when compiled,
[tobi@marktplatz src]$ gcc/build/gcc/f951 < t.f90
Warning: Reading file as free form
.file "<stdin>"
In file :2
INTEGER :: c = SIZE(b)
1
Error: 'array' argument of 'size' intrinsic at (1) must be an array
This is unjustified, I believe, ordering of declarations shouldn't affect the
validity of initializations. ifc compiles this without an error. The relevant
section in the (draft) Fortran 95 standard is 7.1.6.1, no. (7) under
initialization expression.
--
Summary: [gfortran] initialization expressions impose ordering
restrictions
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Tobias dot Schlueter at physik dot uni-muenchen dot de
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15031
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/15031] [gfortran] initialization expressions impose ordering restrictions
2004-04-20 21:44 [Bug fortran/15031] New: [gfortran] initialization expressions impose ordering restrictions Tobias dot Schlueter at physik dot uni-muenchen dot de
@ 2004-04-20 22:32 ` pinskia at gcc dot gnu dot org
2004-05-07 12:22 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
2004-05-08 16:09 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-20 22:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-20 21:43 -------
Confirmed. IFC accepts it.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |rejects-valid
Last reconfirmed|0000-00-00 00:00:00 |2004-04-20 21:43:53
date| |
Target Milestone|--- |tree-ssa
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15031
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/15031] [gfortran] initialization expressions impose ordering restrictions
2004-04-20 21:44 [Bug fortran/15031] New: [gfortran] initialization expressions impose ordering restrictions Tobias dot Schlueter at physik dot uni-muenchen dot de
2004-04-20 22:32 ` [Bug fortran/15031] " pinskia at gcc dot gnu dot org
@ 2004-05-07 12:22 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
2004-05-08 16:09 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
2 siblings, 0 replies; 4+ messages in thread
From: Tobias dot Schlueter at physik dot uni-muenchen dot de @ 2004-05-07 12:22 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Tobias dot Schlueter at physik dot uni-muenchen dot de 2004-05-07 12:22 -------
>From a private conversation with Douglas Cox tcc at sentex dot net:
---------------------------
I don't have a copy of the standard, but I just uploaded your code to Lahey's
source check page, and it found 2 errors. So I think the comment on the G95
Status page is probably justified. I am willing to listen to your evidence on
the question, though. The output in part was:
<begin included test>
Lahey/Fujitsu Fortran 95 Source Check Output
Compiling program unit a at line 1:
2255-S: "SOURCE.F90", line 2: Shape of actual argument for intrinsic
function 'SIZE' invalid.
2006-I: "SOURCE.F90", line 2: 'c' is declared but never referenced.
1143-S: "SOURCE.F90", line 2, column 19: Missing constant expression.
Encountered 2 errors, 0 warnings, 1 information in file SOURCE.F90.
Compiling file SOURCE.F90.
Lahey/Fujitsu Fortran 95 Listing and Cross Reference
Source file : SOURCE.F90
External subroutine subprogram "a"
(line-no.)(nest)
1 SUBROUTINE a(b)
2 INTEGER :: c = SIZE(b)
3 REAL :: b(5)
4 END SUBROUTINE
Diagnostic messages: program name(a)
2255-S: "SOURCE.F90", line 2: Shape of actual argument for intrinsic
function 'SIZE' invalid.
2006-I: "SOURCE.F90", line 2: 'c' is declared but never referenced.
1143-S: "SOURCE.F90", line 2, column 19: Missing constant expression.
Procedure information
Lines : 4
Statements : 4
<end included text>
----------------------------
I will double-check the standard, obviously ifc is not sufficient to evaluate
standard compliance.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15031
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/15031] [gfortran] initialization expressions impose ordering restrictions
2004-04-20 21:44 [Bug fortran/15031] New: [gfortran] initialization expressions impose ordering restrictions Tobias dot Schlueter at physik dot uni-muenchen dot de
2004-04-20 22:32 ` [Bug fortran/15031] " pinskia at gcc dot gnu dot org
2004-05-07 12:22 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
@ 2004-05-08 16:09 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
2 siblings, 0 replies; 4+ messages in thread
From: Tobias dot Schlueter at physik dot uni-muenchen dot de @ 2004-05-08 16:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Tobias dot Schlueter at physik dot uni-muenchen dot de 2004-05-08 16:09 -------
OK, I found the relevant part in the standard:
Section 7.6.1 under initialization expression of the (draft) Fortran 95 standard:
If an initialization expression contains a reference to an inquiry function for
a type parameter or an array bound of an object specified in the same
/specification-part,/ the type parameter or array bound shall be specified in a
prior specification of the /specification-part./ The prior specification may be
to the left of the inquiry function in the same statement.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15031
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-05-08 16:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-20 21:44 [Bug fortran/15031] New: [gfortran] initialization expressions impose ordering restrictions Tobias dot Schlueter at physik dot uni-muenchen dot de
2004-04-20 22:32 ` [Bug fortran/15031] " pinskia at gcc dot gnu dot org
2004-05-07 12:22 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
2004-05-08 16:09 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
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).