Dear Support,
I have a mixed language application (Fortran and C++) and I am currently having a problem with char array sizes when they get passed from Fortran to C++. I receive the array length in C++ as “size_t”. If I run the application through a debugger it’s showing the array lengths corrupted. If I change the array length to “int” instead of “size_t”, things get fixed. When using the Intel compiler I don’t have any issues with size_t. It seems that size_t behaves differently from one compiler to another. We have a few thousand lines of code and I don’t want to change all the instances of size_t into int. Is there a way to get around this (e.g. compiler flags). I am running on RedHat 5.3 64-bit. I am using PGI 11.8. Compilation flags being used:
Fortran: -pgcpplibs -w -pc 64 -Mnoopenmp -Kieee -Mpreprocess -Mbyteswapio -Bstatic
C++: -w -Bstatic
Thank you for your help.