I have some code with user defined data types that have pointer
arrays. I don't really use them as pointers, they are really just
allocated and used in the normal way. Now, most of my compilers
support the allocatable TR, so I'm switching these to allocatable
arrays in the declarations.
When compiling this code with gfortran, I came across the following
situation involving intent(out) dummy arguments. My code apparently
works with pointer components, but it gives me a bus error when I
use allocatable components. If I change the intent(out) to
intent(inout) in the dummy declaration, then both versions
apparently work.
The following short program demonstrates this. On MacOSX
10.5.2
with gfortran
4.3.0, the code errs after the first call.
With several other compilers (including the ABSOFT 9.2 compiler on
PPC and the intel ifort 10.1 compiler on intel) both calls
apparently succeed.