Quantcast
Channel: Recent posts
Viewing all articles
Browse latest Browse all 415

-CB finds issues where everything works as inteded?

$
0
0

Hello,

when I run the following program

program testbounds
	implicit none
	REAL, DIMENSION (5,5) :: A
	INTEGER, DIMENSION (2) :: K = (/ 1, 3 /)

	A = 0.d0
	A (2, (/1, 3, 5/)) = 1.d0
	print*, A
	print*, A (2, K)

end program testbounds

without check options it runs fine and delivers the desired result. When i use compiler option -CB I get

forrtl: severe (408): fort: (3): Subscript #2 of the array A has value 0 which is less than the lower bound of 1

Image              PC                Routine            Line        Source
testbounds.x         0000000000404E66  Unknown               Unknown  Unknown
testbounds.x         0000000000402D84  MAIN__                      9  testbounds.f90
testbounds.x         0000000000402B9E  Unknown               Unknown  Unknown
libc-2.22.so       00002B2D3557A6E5  __libc_start_main     Unknown  Unknown
testbounds.x         0000000000402AA9  Unknown               Unknown  Unknown

This is a bit strange to me and annoying because it prevents the use of -CB to find the real errors.


Viewing all articles
Browse latest Browse all 415

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>