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

-r8 option makes deallocate fail

24689753x
Beginner
404 Views
hi i am using fortran for linux 9.0
i have a bunch of legacy code written in f77 and there all real declaration are real*8 ,

i have been coding in f90 free format , and i wrote my modules and libraries and and have other people's libraries also in f90, here the declararation are simply real , and use some allocateble arrays

i added in my makefile the -r8 option for my f90 files and it compiles with no warning any time i run i got 'error glibc detected double free or corruption '
when i try to deallocate the arrays ,

I compiled without the -r8 option and so far seems to be compatible , however i am afraid in the future one call from my new code to one subroutine in the old legacy code it might not pass the values as it supposed to be

any way to have all real of the same size ?

0 Kudos
1 Reply
Steven_L_Intel1
Employee
404 Views
My guess is that you have a mismatch in types when passing arguments and are accessing outside the actual array or variable. One way to detect this is to use 9.1 ( a current one, preferably) and the "-gen_interface -warn interface" options when building.

I generally recommend against "big hammers" such as -r8, especially when you don't control all the code, as it can cause problems similar to yours.
0 Kudos
Reply