qt
Joined: 23 Aug 2005 Posts: 46 Location: Berlin, Germany
|
Posted: Mon Oct 30, 2006 9:01 am Post subject: Access violation writing an array after using MATMUL |
|
|
Hi Paul,
Professor Lassmann reported another bug I have proofed with v4.91 of FTN95. He wrote:
The demonstration program Test_matmul leads to an unexpected error message “Access violation” caused by the statements
tmp = MatMul (b,u)
Write (*,*) 'tmp = ', tmp
The following statement gives the right answer
Write (*,*) 'tmp = ', tmp (1:2)
He supplied a demo program that shows the error:
Winapp
Program Test_matmul
Implicit None
Real , Dimension (1:2,1:2) :: u
Real , Dimension (1:2 ) :: b, tmp
u = +0.
u (1,1) = -1.
u (2,2) = -1.
b = +0.
b (1 ) = +1.
tmp = +2.
Write (*,*) 'u = ', u
Write (*,*) 'b = ', b
Write (*,*) 'tmp = ', tmp
tmp = MatMul (b,u)
! The following statement gives the right answer
! Write (*,*) 'tmp = ', tmp (1:2)
! The following statement gives 'Access Violation'
Write (*,*) 'tmp = ', tmp
End Program Test_matmul
|
|