Regression or Feature?

Tobias Burnus burnus@net-b.de
Fri Apr 26 19:54:00 GMT 2013


Am 26.04.2013 21:33, schrieb Tilo Schwarz:
>     if (any([a%i, b%i] /= arr%p%i)) call abort
>                          1
> Error: Component to the right of a part reference with nonzero rank 
> must not have the POINTER attribute at (1)
>
> I would expect the behaviour of gfortran 4.6/4.7.
> a.out runs without error for those two compiler versions.

As you have the source code: It often helps to look at the source code 
for a comment - or to find out why it was added.

In this case, there was a reference to a constraint in the code - For 
Fortran 2003. Here, is the Fortran 2008 quote:

"C618 (R611) There shall not be more than one part-ref with nonzero 
rank. A part-name to the right of a part-ref with nonzero rank shall not 
have the ALLOCATABLE or POINTER attribute."

I haven't looked deeply at the issue but NAG f95 5.1 also rejects the 
code with the same message. I assume that it was a constraint which was 
initially missed and unchecked.

Tobias



More information about the Fortran mailing list