View previous topic :: View next topic |
Author |
Message |
mecej4
Joined: 31 Oct 2006 Posts: 1886
|
Posted: Fri Mar 13, 2020 2:34 pm Post subject: Internal compiler with /check |
|
|
The following subroutine is compiled without error with /debug or /opt, but causes an ICE with /check, /undef and /checkmate, with Versions 6.35, 7.2 and 8.51 (for the last, also with /64 added).
Code: | subroutine get_sys_mat()
implicit none
integer :: i
type :: sys_ab
real, allocatable :: a(:)
end type
type (sys_ab) :: sys
complex, allocatable :: a_cplx(:)
allocate(sys%a(10))
do i=1,10
sys%a(i) = cmplx(2.5*i+3.3, -2.3)
end do
allocate (a_cplx(10))
a_cplx = sys%a
print *,a_cplx
deallocate (a_cplx,sys%a)
end subroutine get_sys_mat |
This test code was pared down from a ~4,000 line source file with dependencies on a number of additional modules. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Fri Mar 13, 2020 5:11 pm Post subject: |
|
|
mecej4
Thank you for this. I have added it to the list. |
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1886
|
Posted: Sun Mar 15, 2020 1:32 pm Post subject: |
|
|
This variant of the test code may provide information that may help in finding the reason for the bug; this version does not use complex variables at all.
Code: | subroutine get_sys_mat()
implicit none
integer :: i
type :: sys_ab
integer, allocatable :: a(:)
end type
type (sys_ab) :: sys
real, allocatable :: al(:)
allocate(sys%a(10))
do i=1,10
sys%a(i) = 2.5*i+3.3
end do
allocate (al(10))
al = sys%a
print *,al
deallocate (al,sys%a)
end subroutine get_sys_mat |
Compiling with /check displays an ICE.
Furthermore, changing "real" to "integer" in the declaration of the local variable "al" causes the ICE to disappear. In this short test code, there is no reason for "al" to be of type REAL, but that is not true for the much larger code in my application.
Last edited by mecej4 on Thu Mar 19, 2020 12:43 pm; edited 1 time in total |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Mon Mar 16, 2020 8:01 am Post subject: |
|
|
mecej4
Many thanks for the extra information.
Paul |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Thu Mar 19, 2020 9:31 am Post subject: |
|
|
This failure has now been fixed for the next release of FTN95. |
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1886
|
Posted: Thu Mar 19, 2020 2:19 pm Post subject: |
|
|
Thank you. |
|
Back to top |
|
|
|