[Patch, Fortran] PR fortran/40850 derived type allocatables freed before their components
Tobias Burnus
tobias.burnus@physik.fu-berlin.de
Wed Feb 23 08:54:00 GMT 2011
Mikael Morin wrote:
> The patch fixes the comment 5 in the PR, but not the rest (comment 8).
> I will regression test this tomorrow; OK for trunk if it passes?
OK. Thanks for the patch!
> I forgot to add that I would appreciate if the testcase was
> confirmed to fail without the patch on various platforms
Here, it fails for slighly above 4 kilobyte. I would not make
the test case allocatate much more data - currently its 4 MB -
even if it wouldn't fail on all systems.
Regarding Manfred's point about:
MALLOC_CHECK_=1 and MALLOC_PERTURB_=B
I am not sure it will work in this case, I have the feeling it
won't. However, it is a useful option and there are some regular
GCC testsuite users, which have those this GLIBC options enabled.
Additionally, from time to time someone runs the "dg-do run"
examples through valgrind. Not often, but at least once in a while.
Tobias
> 2011-02-21 Mikael Morin <mikael@gcc.gnu.org>
>
> PR fortran/40850
> * trans.c (gfc_prepend_expr_to_block): New function.
> * trans.h (gfc_prepend_expr_to_block): Declare.
> * trans-array.c (gfc_conv_array_parameter): Replace gfc_add_expr_to_block
> with gfc_prepend_expr_to_block.
>
>
> 2011-02-21 Mikael Morin <mikael@gcc.gnu.org>
>
> PR fortran/40850
> * gfortran.dg/nested_allocatables_1.f90: New.
More information about the Fortran
mailing list