Kenneth_Smith
Joined: 18 May 2012 Posts: 753 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Sun Jan 05, 2025 12:28 am Post subject: PRODUCT(A) when SIZE(A) = 0 |
|
|
The following code generates a run time access violation when compiled with the 64 bit compiler.
The 32 bit compiler returns the correct value of 1.d0
Code: | program bug_in_product
implicit none
real*8 :: a(0)
print*, product(a)
end program bug_in_product |
The access violation occurs for both real and real*8 a. It does not occur for complex a. |
|