Software Archive
Read-only legacy content

calling-called array size mismatch

Ted__S_
Beginner
323 Views

OS             : x86_64 GNU/Linux (CentOS 6.4)

Compiler   : Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 13.1.1.163 Build 20130313

Debugger  : Version 13.0

FFLAGS      : -debug -cpp -zero -convert big_endian  -traceback -fpe0 -g -debug extended  -assume byterecl -i4 -132 -fp-stack-check  -complex-limited-range  -check bounds,pointers,uninit -ftrapuv

Hi,

I have numerous cases when a routine is called with an array with explicit declaration of the array size, but the called routine reports different size. Here is an example:

subroutine get_c4(c4,num_px,sol)
    implicit none
    type(tet_t),intent(in) :: c4
    integer,intent(in)           :: num_px
    double complex,intent(in)    :: e_sol(num_px)
    ...

get_c4 is called with num_px=8585 and with a double coplex x(1:8585), but get_c4 reports 340:

(*** from inside get_c4 ***)

(idb) p num_px
$49 = 8585

(idb) whatis e_sol
type = COMPLEX(16) (340)

Is it a bug? Do I miss something?

Thanks in advance,
--Ted

0 Kudos
1 Reply
Georg_Z_Intel
Employee
323 Views
Hello Ted, that sounds like you compiled with optimizations turned on. In such cases you have to expect that the compiler did some transformations the debugger cannot always unwind. Could you please try to compile with -O0 (-O2 is the default) and verify whether you still see this problem? Thank you & best regards, Georg Zitzlsberger
0 Kudos
Reply