public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/50376] New: pure procedure allows assignment to iterator variable in array constructor
@ 2011-09-13 9:00 zeccav at gmail dot com
2011-09-13 10:09 ` [Bug fortran/50376] " burnus at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: zeccav at gmail dot com @ 2011-09-13 9:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50376
Bug #: 50376
Summary: pure procedure allows assignment to iterator variable
in array constructor
Classification: Unclassified
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: zeccav@gmail.com
Created attachment 25255
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25255
just compile it
gfortran must allow in a PURE procedure assignment to iterator variable in
array constructor
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/50376] pure procedure allows assignment to iterator variable in array constructor
2011-09-13 9:00 [Bug fortran/50376] New: pure procedure allows assignment to iterator variable in array constructor zeccav at gmail dot com
@ 2011-09-13 10:09 ` burnus at gcc dot gnu.org
2013-07-14 23:40 ` zeccav at gmail dot com
2013-07-15 6:47 ` burnus at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-09-13 10:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50376
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-09-13 09:54:27 UTC ---
The constraint leading the rejection is the following (C1283) - though having a
variable in as ac-do-variable is something different (cf. 16.4).
Other compilers also accept the program
F2008 for quotes:
"C1283 In a pure subprogram any designator with a base object that
is in common or accessed by host or use association, is a dummy
argument with the INTENT (IN) attribute, is a coindexed object, or
an object that is storage associated with any such variable, shall
not be used
(1) in a variable de\fnition context (16.6.7),
(2) as the data-target in a pointer-assignment-stmt,
(3) as the expr corresponding to a component with the POINTER attribute
in a structure-constructor,
(4) as the expr of an intrinsic assignment statement in which the variable
is of a derived type if the derived type has a pointer component at
any level of component selection, or
(5) as an actual argument corresponding to a dummy argument with
INTENT (OUT) or INTENT (INOUT) or with the POINTER attribute."
"16.4 Statement and construct entities"
"A variable that appears as a data-i-do-variable in a DATA statement or an
ac-do-variable in an array constructor,
as a dummy argument in a statement function statement, or as an index-name in a
FORALL statement is a statement entity. A variable that appears as an
index-name in a FORALL or DO CONCURRENT or as an associate-name in a SELECT
TYPE or ASSOCIATE construct is a construct entity. [...]"
"The name of a statement entity shall not be the same as an accessible global
identi\fer or local identi\fer of class (1) (16.3.1), except for a common block
name or a scalar variable name. Within the scope of a statement entity, another
statement entity shall not have the same name."
"The name of a data-i-do-variable in a DATA statement or an ac-do-variable in
an array constructor has a scope of its data-implied-do or ac-implied-do. It is
a scalar variable that has the type and type parameters that it would have if
it were the name of a variable in the innermost executable construct or scoping
unit that includes the DATA statement or array constructor, and this type shall
be integer type; it has no other attributes. The appearance of a name as a
data-i-do-variable of an implied DO in a DATA statement or an ac-do-variable in
an array constructor is not an implicit declaration of a variable whose scope
is the scoping unit that contains the statement."
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/50376] pure procedure allows assignment to iterator variable in array constructor
2011-09-13 9:00 [Bug fortran/50376] New: pure procedure allows assignment to iterator variable in array constructor zeccav at gmail dot com
2011-09-13 10:09 ` [Bug fortran/50376] " burnus at gcc dot gnu.org
@ 2013-07-14 23:40 ` zeccav at gmail dot com
2013-07-15 6:47 ` burnus at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: zeccav at gmail dot com @ 2013-07-14 23:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50376
--- Comment #2 from Vittorio Zecca <zeccav at gmail dot com> ---
I believe this has been fixed in gfortran 4.8.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/50376] pure procedure allows assignment to iterator variable in array constructor
2011-09-13 9:00 [Bug fortran/50376] New: pure procedure allows assignment to iterator variable in array constructor zeccav at gmail dot com
2011-09-13 10:09 ` [Bug fortran/50376] " burnus at gcc dot gnu.org
2013-07-14 23:40 ` zeccav at gmail dot com
@ 2013-07-15 6:47 ` burnus at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-07-15 6:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50376
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
CC| |burnus at gcc dot gnu.org
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
I believe this has been fixed in GCC 4.8 by the patch for PR54958.
Close as FIXED.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-07-15 6:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-13 9:00 [Bug fortran/50376] New: pure procedure allows assignment to iterator variable in array constructor zeccav at gmail dot com
2011-09-13 10:09 ` [Bug fortran/50376] " burnus at gcc dot gnu.org
2013-07-14 23:40 ` zeccav at gmail dot com
2013-07-15 6:47 ` burnus at gcc dot gnu.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).