This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch,Fortran] PR40851 Fix wrong default initialization of DT pointers


Tobias Burnus wrote:
The following patch is close to being obvious. With the introduction of
pointer intents, the assumption that INTENT_OUT is not a pointer and
thus the default initialization can be/has to be applied is wrong.

Without the patch, gfortran first tries to deallocate "ptr" which fails
as the pointer is uninitialized. Afterwards, it tries to apply the
default initialization due to the allocatable component, which gives an
assert of the run-time linker.

Thanks to Jürgen Reuter for including both - otherwise, I might have
forgotten to change resolve.c as well.

Build and regtested on x86-64-linux. OK for the trunk and 4.4? Shall we
also backport it to 4.3?

Ok for trunk and 4.4, also 4.3 if you want (I've no strong opinion on whether to backport or not).


Thanks!
Daniel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]