[Bug fortran/20541] INTEGER type declaration: ALLOCATABLE, compilation error

kargl at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Mar 18 22:09:00 GMT 2005


------- Additional Comments From kargl at gcc dot gnu dot org  2005-03-18 22:08 -------
Your code is illegal with respect to the Fortran 95 standard.  See section
4.4.1, page 38, of the (draft) standard, you'll find the following 

R426  component-attr-spec   is POINTER
                            or DIMENSION ( component-array-spec )

Note ALLOACTABLE is not listed above.

If you have Metcalf & Reid, Fortran 90/95 Explained, 2nd ed., you'll find on
page 107:

   If a variable-sized array component of a structure is required,
   unfortunately, an array pointer must be used (see Section 6.14).
   The prohibition on allocatable arrays here was made to keep the
   the feature simple, but this is now recognized as a mistake that
   will be corrected in Fortran 2000
  

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20541



More information about the Gcc-bugs mailing list