A2L*_*LBK 5 fortran intel-fortran
请考虑以下代码
module t_test
implicit none
type ttt(tsize)
integer, len :: tsize
real x(tsize)
end type ttt
type :: t_rndom_diameter(t_rsize,t_csize)
integer, len :: t_rsize,t_csize
real :: x(t_rsize,t_csize)
type(ttt(tsize=:)), allocatable :: test_type
end type t_rndom_diameter
end module t_test
program p_test
USE t_test
implicit none
type(t_rndom_diameter(t_rsize=3,t_csize=3)) :: gdad
allocate(gdad% ttt(tsize=10) :: gdad % test_type)
end program
Run Code Online (Sandbox Code Playgroud)
它给了我一个灾难性的错误,而没有提到错误是什么:
catastrophic error: **Internal compiler error: segmentation violation signal raised** Please
report this error along with the circumstances in which it occurred in a Software Problem
Report. Note: File and line given may not be explicit cause of this error.
Run Code Online (Sandbox Code Playgroud)
但是,我知道是什么触发了此错误,即: allocate(gdad% ttt(tsize=10) :: gdad% test_type)
这是什么意思?
我也试过没有gdad,即allocate(gdad% ttt(tsize=10) :: test_type)
| 归档时间: |
|
| 查看次数: |
98 次 |
| 最近记录: |