Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28456 Discussions

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

vivekbedekar
Beginner
794 Views
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,
vivek
0 Kudos
1 Reply
james1
Beginner
794 Views
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.

James
0 Kudos
Reply