Compile error: array argument said to have procedure attribute

Arjen Markus arjen.markus895@gmail.com
Wed Aug 31 10:57:00 GMT 2011


Hi Janus,

yes, somewhere in the back of my head the thought lingered that I did not
mention which version of gfortran I used. But it was a 4.6 version:

Built by Equation Solution <http://www.Equation.com>.
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=d:/gcc4.6/bin/../libexec/gcc/i686-pc-mingw32/4.6.0/lto-wrapper.exe
Target: i686-pc-mingw32
Thread model: win32
gcc version 4.6.0 20110101 (experimental) (GCC)

Well, I guess the issue of the compiler diagnostic has been solved already.
And I realise that the implementation of such a feature has quite a
few consequences (now that
I know it has not yet been done).

Regards,

Arjen

2011/8/31 Janus Weil <janus@gcc.gnu.org>:
> Hi Arjen,
>
>> when I try to compile the program below I get the following messages:
>>
>> sort_mystery.f90:15.22:
>>
>> subroutine sort( array )
>>                      1
>> Error: PROCEDURE attribute conflicts with INTENT attribute in 'array' at (1)
>
> well, you should also mention that this only happens with gfortran 4.5
> (though I'm not sure why). With 4.6 and trunk I get the (correct)
> error message:
>
>   class(sortable), dimension(:), intent(inout), target :: array
>                                                                1
> Fatal Error: Polymorphic array at (1) not yet supported
>
> Unfortunately, "CLASS(..), DIMENSION(..)" variables are still not
> supported by gfortran, and I am currently not in the position to start
> a project of this scale. There was a draft patch by Paul a while ago,
> but I'm not sure how far this goes or if he is still working on this.
>
> Cheers,
> Janus
>
>
>
>> --------
>> ! abstract_sort.f90 --
>> !     Show how to define a generic sortable type
>> !
>> ! Module for sortable objects
>> !
>> module sortable_types
>>
>>    type, abstract :: sortable
>>        ! No particular data
>>    contains
>>    end type sortable
>>
>> contains
>>
>> subroutine sort( array )
>>    class(sortable), dimension(:), intent(inout), target :: array
>>
>>    class(sortable), allocatable :: tmp
>>    class(sortable), pointer     :: first_element
>>
>>    integer                       :: i
>>    integer                       :: j
>>
>>    allocate( tmp, source = array(1) )
>>
>>    write(*,*) size(array)
>> end subroutine sort
>>
>> end module sortable_types
>>
>



More information about the Fortran mailing list