On 07/19/2011 05:24 PM, Mikael Morin wrote:
On Monday 18 July 2011 21:37:24 Tobias Burnus wrote:
Now about your request:
I would be happy if someone could carefully read the function in expr.c
- and confirm that the second test case ("dg-error" line) is indeed
invalid. I think it is invalid because one has an array element of a
coarray, which is a coarray but which is not simply contiguous.
I don't understand what is your concern here; the standard seems pretty clear
Well, I was confused about it as passing an array element as actual
argument to a dummy argument is OK, while it is not for coarrays.
Additionally, there is a test case, which is supposedly valid (and
accepted by some compilers) but fails. - And it is not the first time
that I fail either to read something obvious as such (mind too much
twisted) - or to miss some constraint elsewhere (mind too little twisted).
However, in this case, the F2008 standard seems to relatively clearly
reject it - though not clearly enough as J3 suggested to edit the text
to make it even clearer:
http://j3-fortran.org/doc/meeting/193/10-226r2.txt
However, in the J3 ballot the modified proposal was rejected - and some
want to have the original version back:
http://j3-fortran.org/doc/meeting/193/10-226.txt
(Cf. comments for F08/0048 at
http://j3-fortran.org/doc/year/11/11-006A.txt )
Thus, the standard is not as obvious as one might think ;-)
So, to sum up, if one sticks to fortran 2008, the test is clearly
invalid and..
... thus the current version rejects it. I think we leave it like that
and keep PR 45859 as tracking bug.
Build and regtested on x86-64-linux.
OK for the trunk?
... the patch is ok with the two minor changes suggested above.
Committed with the two changes as Rev. 176467. Thanks for the review!
Tobias