I recompiled some code from a few years back and ran into some problems with 64bit /checkmate.
The following cut down code reproduces the problem. This runs fine with Win32 /Checkmate Win32 /Debug Win32 /Release X64 /Debug X64 /Release
It fails with X64 /Checkmate
I have the latest debuggers, plato, and ftn on my machine.
Ken
module asymmetric_wave_mod
implicit none
private
public asymmetric_wave_cb
integer, parameter :: dp = kind(1.d0)
integer, parameter :: npoints_max = 1 !##### This value was originally much larger. Problem does not appear to be
! related to the dimension of the allocated arrays
real(kind=dp), allocatable :: idc_plot(:), iac_plot(:), iinst_plot(:), ienv1_plot(:), ienv2_plot(:), time_plot(:), &
iinstsq_plot(:), iinstsqtime_plot(:), irms_plot(:)
contains
integer function asymmetric_wave_cb()
include<windows.ins>
integer, save :: iw
allocate (idc_plot(npoints_max), iac_plot(npoints_max), iinst_plot(npoints_max), &
ienv1_plot(npoints_max), ienv2_plot(npoints_max), time_plot(npoints_max), &
iinstsq_plot(npoints_max), iinstsqtime_plot(npoints_max), irms_plot(npoints_max) )
idc_plot = 1.d0 ; iac_plot = 2.d0
iinst_plot = 3.d0 ; ienv1_plot = 4.d0
ienv2_plot = 5.d0 ; time_plot = 6.d0
iinstsq_plot = 7.d0 ; iinstsqtime_plot = 7.d0
irms_plot = 8.d0
print*,'Contents of allocated arrays'
print*,idc_plot,iac_plot, iinst_plot, ienv1_plot, ienv2_plot, time_plot, &
iinstsq_plot, iinstsqtime_plot, irms_plot
iw = winio@('%ww[no_maxminbox,no_sysmenu]&')
iw = winio@('%mn[Exit]&','exit')
iw = winio@('Click on EXIT menu to generate error when compiled X64 /Checkmate&')
iw = winio@(' ')
! ########## dellocate below runs into problems when compiled with /checkmate X64
print*,'At line before deallocate'
deallocate (idc_plot, iac_plot, iinst_plot, ienv1_plot, ienv2_plot, time_plot, iinstsq_plot, iinstsq_plot, &
iinstsqtime_plot, irms_plot)
print*, 'At line after deallocate'
asymmetric_wave_cb = 1
end function asymmetric_wave_cb
end module asymmetric_wave_mod
program main
use asymmetric_wave_mod, only : asymmetric_wave_cb
implicit none
integer, save :: iw
iw = winio@('%ww[no_maxminbox,no_sysmenu]&')
iw = winio@('%mn[Exit]&','exit')
iw = winio@('%fn[Tahoma]%bg[grey]&')
iw = winio@('Click on button below&')
iw = winio@('%bc[white]%2nl%28^bt[Asymmetric wave]&', asymmetric_wave_cb)
iw = winio@(' ')
end program main