-r8 option makes deallocate fail

-r8 option makes deallocate fail

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 ?

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

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.

Retired 12/31/2016

Leave a Comment

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