This may also be a bug with the 6.0.5 64 bit compiler. I spent a couple of days working with a PG technical support person by email trying to sort out why I was getting memory corrupted in a 64 bit compilation version of my code and not with the 32 bit version. Again, like you and several other posters in this forum - the problem arose in a mixed C and Fortran environment. I don’t have much C code - mostly an interface to the C library for date, time and random number functions that were not provided in older fortran compilers - and the technical support person and I went over it in detail without identifying any porting issues. It got to the point where he needed a register by register comparison between the 32 and 64 bit versions to try to identify the issue. Personally, I don’t have the time to spend on it.
However, to add something useful, I have just replaced the C in my code with the equivalent f90 library functions it and I STILLl get corruption of data occuring in the 64 bit version which does not exist in the 32 bit version. However, some calls to the so-called 3F functions which may use the C library intrinsically still remain in the code - getenv and mclock among others for example. However, if this is the source of the problem then it is definitely a 64 bit compiler bug since presumably the libraries and their interface are correct.
As an additional note, producing 64 bit output compiled with -g instead of -O gives a direct memory fault error message instead of my code giving an error mesage because some piece of stored data has mysteriously changed.
At the present time - I would deem the 64 bit PGI fortran compilers simply unusable for my application. Luckily, everything woks fine in 32 bit by just adding the -tp k8-32 flag and the -m32 flag for the small amount of C code I have. I wonder how many folks have run into problems with the 64 bit compilers and simply ignore it since it works in 32 bit?
P.S. Actually I’m curious - do you have to adjust the variables passed to the 3F category functions provided by PGI for the differences between 32 and 64 bits? I would have thought this would have been handled by PGI since they provide that functionality at the fortran level rather than with an inter language interface.