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

error #7157 in intel fortran compiler v11.1

Maxim
Beginner
305 Views
I have a code consisting of many modules written in fortran 95. When I compile the code using inter compiler ifort, I got an error message #7157 complaining that a locally defined integer variable has been incorrectly used in a specification of a contained procedure. Does anyone can help and explain me what happens here really? In fact, this code has been successfully compiled using gfortran and ran properly before.

Thanks in advance.
0 Kudos
1 Reply
Steven_L_Intel1
Employee
305 Views
You will need to show us the code. Ideally, a short but compilable source that demonstrates the problem. If it is a larger file, attach it to a reply here.

Generically, that error means that in a specification expression, which is used for declaring array bounds and similar things, you have a variable that is not a dummy argument, COMMON variable, or a variable that is use or host associated. It could be that our compiler made an error, or maybe not. Let's see the code.
0 Kudos
Reply