|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
Kenneth_Smith
Joined: 18 May 2012 Posts: 709 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Thu Feb 23, 2023 3:40 pm Post subject: Transpose + reshape + array constructor + CMPLX real part |
|
|
The following code runs correctly when compiled under Win32. A runtime error occurs when complied under x64.
Code: | program test
use iso_fortran_env
implicit none
complex y(2,2)
integer :: m = 2, i, j
print*, compiler_version()
print*, compiler_options()
y = transpose(reshape([(1),(2),(3),(4)],shape(y))) ! This line causes runtime error when compiled with X64
do i = 1, m
print*, (y(i,j),j=1,m)
end do
end |
If line 8 is changed to:
Code: | y = transpose(reshape([(1,0),(2,0),(3,0),(4,0)],shape(y))) |
or
Code: | y = transpose(reshape([cmplx(1,0),cmplx(2,0),cmplx(3,0),cmplx(4,0)],shape(y))) |
The run time error does not occur. (I using the most recent update i.e. FTN v 8.96 |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8012 Location: Salford, UK
|
Posted: Thu Feb 23, 2023 5:28 pm Post subject: |
|
|
Ken
Thank you for the bug report. I will make a note that this needs fixing. |
|
Back to top |
|
|
Kenneth_Smith
Joined: 18 May 2012 Posts: 709 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Fri Feb 24, 2023 10:11 am Post subject: |
|
|
Paul,
This may assist. If line 8 is changed to:
Code: | y = transpose(reshape([1,2,3,4],[2,2])) |
i.e. the call to shape(y) is removed, under X64 the program does not crash, but the results in y are incorrect. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8012 Location: Salford, UK
|
Posted: Wed Apr 19, 2023 11:13 am Post subject: |
|
|
This bug has now been fixed for the next release of clearwin64.dll. |
|
Back to top |
|
|
|
|
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
|