------- Comment #2 from kargl at gcc dot gnu dot org  2010-02-14 17:27 -------

> NAMELIST/TOTO/TAB
>                  1
> Error: NAMELIST attribute conflicts with ALLOCATABLE attribute in 'tab' at (1)
> ========
> 
> Test file :
> ========
> PROGRAM MAIN
> REAL, DIMENSION(:), ALLOCATABLE :: TAB
> NAMELIST/TOTO/TAB
> END PROGRAM MAIN
> ========
> 
> It should work with F2003 new features.

Interesting.  I can't find a passage in the F2003 standard that
specifically allows this form.  I do find a passage that indicates
that it is not allowed.  In section 5.4:

    A namelist group object shall either be accessed by use or
    host association or shall have its type, type parameters, and
    shape specified by previous specification statements ...

In your code, the shape of the array has not been specified by a
previous specification statement.  OTOH, I do find in 9.5.3.6,

    Every allocatable namelist-group-object in the namelist group
    shall be allocated and every namelist-group-object that is a
    pointer shall be associated with a target.

which suggests that the form is legal.


-- 


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

Reply via email to