forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Internal compiler with /check

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Fri Mar 13, 2020 2:34 pm    Post subject: Internal compiler with /check Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Fri Mar 13, 2020 5:11 pm    Post subject: Reply with quote

mecej4

Thank you for this. I have added it to the list.
Back to top
View user's profile Send private message AIM Address
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Sun Mar 15, 2020 1:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Mar 16, 2020 8:01 am    Post subject: Reply with quote

mecej4

Many thanks for the extra information.

Paul
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Thu Mar 19, 2020 9:31 am    Post subject: Reply with quote

This failure has now been fixed for the next release of FTN95.
Back to top
View user's profile Send private message AIM Address
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Thu Mar 19, 2020 2:19 pm    Post subject: Reply with quote

Thank you.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group