(j3.2006) (SC22WG5.4338) Has something dropped out of Fortran 2008?

Jim Xia jimxia
Sun Sep 26 14:34:01 EDT 2010


Neither XLF will allow your program to compile.  This has been restricted

The relevant text in F08



The similar restriction on assumed-shape or pointer arrays can be found in 
Fortran 95 standard.

Cheers,


Jim Xia

XL Fortran Compiler Test
IBM Toronto Lab at 8200 Warden Ave, Markham, On, L6G 1C7
Phone (905) 413-3444  Tie-line 313-3444
email: jimxia at ca.ibm.com
D2/YF7/8200 /MKM

http://www.ibm.com/software/awdtools/fortran/xlfortran



From:
"N.M. Maclaren" <nmm1 at cam.ac.uk>
To:
sc22wg5 at open-std.org
Date:
09/26/2010 02:13 PM
Subject:
(j3.2006) (SC22WG5.4337) Has something dropped out of Fortran 2008?



This arose out of the Interoperability and MPI area. None of NAG, gfortran 

or Intel allow me to use an element of an assumed-shape array as an actual 

argument where the dummy is assumed-size. No problem - except that I can't 

find any such restriction in Fortran 2008. In the absence of that, 
12.5.2.11 paragraph 1 is a little ambiguous.

Is there there and I failed to find it, is it a change, or has it dropped
out by accident?

A program that shows the error is:

PROGRAM Main
    INTEGER :: i, j
    INTEGER :: a(9,9)
    DO j = 1,9
        DO i = 1,9
            a(i,j) = 10*j+i
        END DO
    END DO
    CALL Fred(a(5,:))
CONTAINS
    SUBROUTINE Fred (b)
        INTEGER :: b(:)
        PRINT *, b
        CALL Joe(b(1))    ! This is erroneous
    END SUBROUTINE Fred
    SUBROUTINE Joe(c)
        INTEGER :: i
        INTEGER :: c(*)
        DO i = 1,9
            PRINT *, c(i)
        END DO
    END SUBROUTINE Joe
END PROGRAM Main

Regards,
Nick.

_______________________________________________
J3 mailing list
J3 at j3-fortran.org
http://j3-fortran.org/mailman/listinfo/j3


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://j3-fortran.org/pipermail/j3/attachments/20100926/956ded82/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 9547 bytes
Desc: not available
URL: <http://j3-fortran.org/pipermail/j3/attachments/20100926/956ded82/attachment-0001.gif>



More information about the J3 mailing list