Silverfrost Forums

Welcome to our forums

Internal compiler error with /64 /checkmate

3 Dec 2021 6:24 #28548

The following trivial cut-down subroutine code causes the compiler to encounter an internal compiler error when the /64 and /checkmate options are used.

      subroutine prob(t) 
      implicit none
      real(kind(1d0)), intent(out) :: t(1:*) 
!
      t(1)   = 0D0 
      return  
      end subroutine prob 

The compiler says:

s:\ODE\MEBDF\UniBA\f90\tbed>ftn95 /64 /checkmate rober.f90
[FTN95/x64 Ver. 8.82.0 Copyright (c) Silverfrost Ltd 1993-2021]
0001)       subroutine prob(t)
*** Internal compiler error - floating point exception
3 Dec 2021 8:45 #28550

mecej4

Thanks for the bug report. It appears that, at the moment /UNDEF works but /FULL_UNDEF (i.e. /CHECKMATE) does not. So the 'undef' checking of character variables in this context must be omitted until this is fixed.

8 Dec 2021 6:02 #28594

This bug has now been fixed for the next release of FTN95. It concerns setting INTENT(OUT) arrays to the 'undefined' state on entry to a subprogram. This is not possible when the array is 'star-sized' and the compiler was did not allowing for this case.

At the moment the compiler can only be used with /full_undef (i.e. checkmate) in this context if /inhibit_check 14 is also applied.

9 Dec 2021 1:43 #28595

Paul,

I find it impressive that FTN95 can provide debug information for when the array is 'star-sized'. To be able to track the original memory allocation size for this type of declaration is very useful when using SDBG64.

Thanks for maintaining this capability.

9 Dec 2021 1:49 #28596

Paul,

Thanks for the bug fix. I am puzzled by your mentioning 'character variables'. My example code did not involve character variables. For that code, if checking cannot be done, a warning message to that effect rather than 'internal compiler error' would suffice.

Quoted from PaulLaidler So the 'undef' checking of character variables in this context must be omitted until this is fixed.

9 Dec 2021 6:33 #28597

mecej4

Yes, that was simply my mistake. I had forgotten that /checkmate now includes this INTENT(OUT) checking.

Please login to reply.