Run-time error (Array bounds exceeded) with Compaq Visual Fortran

Run-time error (Array bounds exceeded) with Compaq Visual Fortran

I am trying to run a problem with Compaq Visual Fortran. It gives an error which says: "Unhandled exception in *.exe: 0xC000008C: Array Bounds Exceeded." when I run it in Debug mode. When I run the same problem using Salford Compiler, it gives me correct solution. What could be the possible reason for this error? Are there any compilation settings I need to check during compilation?

Please suggest.

Thank you,

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Sounds like one compiler is checking array bounds for you (with CVF this is /check:bounds) and the other isn't. Generally it is considered bad form to purposefully access array elements outside of the defined limit, but lots of old code does this. So you need to determine if you would like to take advantage of the runtime error and prevent this from happening, or just do a /check:nobounds in your project setup and CVF will happily ignore this like the other compiler, as long as you don't index yourself into memory protection problems.


Leave a Comment

Please sign in to add a comment. Not a member? Join today