[Patch, Fortran] Fix elemental diagnostic for polymorphic dummies

Tobias Burnus burnus@net-b.de
Thu Jan 26 23:52:00 GMT 2012


Dominique found out that there is no diagnostic for polymorphic arrays. 
This patch adds it.

 From the F2008 standard:

"C1289 All dummy arguments of an elemental procedure shall be scalar 
noncoarray dummy data objects and shall not have the POINTER or 
ALLOCATABLE attribute."

"An elemental subroutine has only scalar dummy arguments, but may have 
array actual arguments. In a reference to an elemental subroutine, 
either all actual arguments shall be scalar, or all actual arguments 
corresponding to INTENT (OUT) and INTENT (INOUT) dummy arguments shall 
be arrays of the same shape and the remaining actual arguments shall be 
conformable with them."


Build and currently regtesting on x86-64-linux.
OK for the trunk?

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: poly-elem-check.diff
Type: text/x-patch
Size: 2608 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120126/39674df2/attachment.bin>


More information about the Gcc-patches mailing list