* [Bug fortran/25095] Disallowed intrinsic in initialization statement
2005-11-26 18:06 [Bug fortran/25095] New: better diagnostic needed jv244 at cam dot ac dot uk
@ 2006-06-04 9:52 ` fxcoudert at gcc dot gnu dot org
2006-06-04 10:43 ` jv244 at cam dot ac dot uk
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-06-04 9:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from fxcoudert at gcc dot gnu dot org 2006-06-04 09:52 -------
By F2003: "C561 (R528) In an array-element or a scalar-structure-component that
is a data-i-do-object , any subscript shall be an expression whose primaries
are either constants, subobjects of constants, or
DO variables of this data-implied-do or the containing data-implied-dos, and
each operation shall be intrinsic."
Now, MODULO is found under 13.5 (Standard generic intrinsic procedures) so, by
my reading of the standard, this is allowed. And the F95 standard seems to have
exactly the same wording.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu dot
| |org
Keywords| |accepts-invalid
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25095
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/25095] Disallowed intrinsic in initialization statement
2005-11-26 18:06 [Bug fortran/25095] New: better diagnostic needed jv244 at cam dot ac dot uk
2006-06-04 9:52 ` [Bug fortran/25095] Disallowed intrinsic in initialization statement fxcoudert at gcc dot gnu dot org
@ 2006-06-04 10:43 ` jv244 at cam dot ac dot uk
2007-05-21 19:07 ` dfranke at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: jv244 at cam dot ac dot uk @ 2006-06-04 10:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jv244 at cam dot ac dot uk 2006-06-04 10:42 -------
(In reply to comment #1)
> .. and
> each operation shall be intrinsic
> Now, MODULO is found under 13.5 (Standard generic intrinsic procedures)
But MODULO is not an intrinsic operation (these are defined in 7.1.2)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25095
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/25095] Disallowed intrinsic in initialization statement
2005-11-26 18:06 [Bug fortran/25095] New: better diagnostic needed jv244 at cam dot ac dot uk
2006-06-04 9:52 ` [Bug fortran/25095] Disallowed intrinsic in initialization statement fxcoudert at gcc dot gnu dot org
2006-06-04 10:43 ` jv244 at cam dot ac dot uk
@ 2007-05-21 19:07 ` dfranke at gcc dot gnu dot org
2007-10-07 19:43 ` tobi at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-05-21 19:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from dfranke at gcc dot gnu dot org 2007-05-21 20:07 -------
Confirmed by majority vote.
$> ifort -warn all pr25095.f90
fortcom: Error: pr25095.f90, line 2: This expression cannot be evaluated.
[MODULO]
DATA (i(MODULO(j,5)),j=1,4) /4*0/
--------^
fortcom: Info: pr25095.f90, line 1: This variable has not been used. [I]
INTEGER :: i(10), j
-----------^
compilation aborted for pr25095.f90 (code 1)
$> sunf95 -w4 pr25095.f90
DATA (i(MODULO(j,5)),j=1,4) /4*0/
^
"pr25095.f90", Line = 2, Column = 9: ERROR: This function name must not appear
in a DATA statement expression.
f90comp: 3 SOURCE LINES
f90comp: 1 ERRORS, 0 WARNINGS, 0 OTHER MESSAGES, 0 ANSI
$> gfortran-svn -v
gcc version 4.3.0 20070517 (experimental)
still accepts this code.
--
dfranke at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-05-21 20:07:27
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25095
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/25095] Disallowed intrinsic in initialization statement
2005-11-26 18:06 [Bug fortran/25095] New: better diagnostic needed jv244 at cam dot ac dot uk
` (2 preceding siblings ...)
2007-05-21 19:07 ` dfranke at gcc dot gnu dot org
@ 2007-10-07 19:43 ` tobi at gcc dot gnu dot org
2007-10-07 19:49 ` tobi at gcc dot gnu dot org
2008-01-04 11:08 ` dfranke at gcc dot gnu dot org
5 siblings, 0 replies; 8+ messages in thread
From: tobi at gcc dot gnu dot org @ 2007-10-07 19:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from tobi at gcc dot gnu dot org 2007-10-07 19:43 -------
E.g. the following is legal:
INTEGER :: I(350)
INTEGER, PARAMETER :: K(500) = (/ i, i=1,500 /)
REAL :: X
DATA I(4+K(PRECISION(X))) / 1 /
whereas
DATA I(PRECISION(X)) / 1 /
isn't.
--
tobi at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tobi at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25095
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/25095] Disallowed intrinsic in initialization statement
2005-11-26 18:06 [Bug fortran/25095] New: better diagnostic needed jv244 at cam dot ac dot uk
` (3 preceding siblings ...)
2007-10-07 19:43 ` tobi at gcc dot gnu dot org
@ 2007-10-07 19:49 ` tobi at gcc dot gnu dot org
2008-01-04 11:08 ` dfranke at gcc dot gnu dot org
5 siblings, 0 replies; 8+ messages in thread
From: tobi at gcc dot gnu dot org @ 2007-10-07 19:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from tobi at gcc dot gnu dot org 2007-10-07 19:49 -------
(In reply to comment #4)
> E.g. the following is legal:
iff PRECISION(X) <= 350 :-)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25095
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/25095] Disallowed intrinsic in initialization statement
2005-11-26 18:06 [Bug fortran/25095] New: better diagnostic needed jv244 at cam dot ac dot uk
` (4 preceding siblings ...)
2007-10-07 19:49 ` tobi at gcc dot gnu dot org
@ 2008-01-04 11:08 ` dfranke at gcc dot gnu dot org
5 siblings, 0 replies; 8+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2008-01-04 11:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from dfranke at gcc dot gnu dot org 2008-01-04 10:10 -------
*** Bug 34664 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25095
^ permalink raw reply [flat|nested] 8+ messages in thread