在Fortran2003程序使用異步屬性,我想創建派生類型,其包括具有asynchronous
屬性的分配數組:在派生類型
module async_in_type
type async_array
integer, dimension(:), allocatable, asynchronous :: a
end type async_array
end module async_in_type
當我試圖編譯上面GCC代碼時,得到以下錯誤消息:
$ gfortran -c -Wall -Wextra async_in_type.F90
GNU Fortran (GCC) 4.10.0 20140718 (experimental)
async_in_type.F90:3.52:
integer, dimension(:), allocatable, asynchronous :: a
1
Error: Attribute at (1) is not allowed in a TYPE definition
隨着NAG的Fortran消息是相似的:
$ nagfor -c async_in_type.F90
NAG Fortran Compiler Release 6.0(Hibiya)
Product NPL6A60NA for x86-64 Linux
Error: async_in_type.F90, line 3: Syntax error
detected at ,@ASYNCHRONOUS
[NAG Fortran Compiler pass 1 error termination, 1 error]
這種限制的原因是什麼?是否有可能克服這個限制?
沒有多少人訂閱了fortran2003標籤的情況。 – 2014-12-19 11:56:38