This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35769] New: inappropriate FORALL error
- From: "dick dot hendrickson at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Mar 2008 20:45:00 -0000
- Subject: [Bug fortran/35769] New: inappropriate FORALL error
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following (silly) program gives an incorrect error message.
There is only one assignment to each diagonal element of
the array. I don't feel strongly about this because FORALL
is sort of a junk feature and this is an unlikely programming
style. But, to be correct you should downgrade from ERROR
to WARNING for the message severity.
Dick Hendrickson
program forall_warn
integer lda(10,10)
FORALL(J1=1:10, J2=1:10, J1 .EQ. J2) LDA(J1,J1) = 1
end
gfortran:gfortran forall_warn.f
forall_warn.f:4.47:
FORALL(J1=1:10, J2=1:10, J1 .EQ. J2) LDA(J1,J1) = 1
1
Error: The FORALL with index 'j2' cause more than one assignment to this object
at (1)
--
Summary: inappropriate FORALL error
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dick dot hendrickson at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35769