This is the mail archive of the gcc-bugs@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]

[Bug fortran/61831] [4.9/ 5 Regression] runtime error: pointer being freed was not allocated


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61831

--- Comment #60 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Sun Jan 17 17:34:12 2016
New Revision: 232482

URL: https://gcc.gnu.org/viewcvs?rev=232482&root=gcc&view=rev
Log:
2016-01-17  Mikael Morin  <mikael@gcc.gnu.org>

        Backport from trunk.
        PR fortran/61831
        * gfortran.dg/derived_constructor_components_6.f90: New file.
        * gfortran.dg/allocate_with_source_14.f03: Change count of
        __builtin_malloc from 21 to 23.

2016-01-17  Paul Thomas  <pault@gcc.gnu.org>

        Backport from trunk.
        PR fortran/66082
        * gfortran.dg/alloc_comp_auto_array_3.f90: New file. Count of
        __builtin_malloc increased from 3 to 4, relative to trunk.

2016-01-17  Mikael Morin  <mikael@gcc.gnu.org>
            Dominique d'Humieres  <dominiq@lps.ens.fr>

        Backport from trunk.
        PR fortran/61831
        * trans-array.c (gfc_conv_array_parameter): Guard allocatable
        component deallocation code generation with descriptorless
        calling convention flag.
        * trans-expr.c (gfc_conv_expr_reference): Remove allocatable
        component deallocation code generation from revision 212329.
        (expr_may_alias_variables): New function.
        (gfc_conv_procedure_call): New boolean elemental_proc to factor
        check for procedure elemental-ness.  Rename boolean f to nodesc_arg
        and declare it in the outer scope.  Use expr_may_alias_variables,
        elemental_proc and nodesc_arg to decide whether generate allocatable
        component deallocation code.
        (gfc_trans_subarray_assign): Set deep copy flag.

2016-01-17  Paul Thomas  <pault@gcc.gnu.org>

        Backport from trunk.
        PR fortran/66082
        * trans-array.c (gfc_conv_array_parameter): Ensure that all
        non-variable arrays with allocatable components have the
        components deallocated after the procedure call.


Added:
    branches/gcc-5-branch/gcc/testsuite/gfortran.dg/alloc_comp_auto_array_3.f90
   
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/derived_constructor_comps_6.f90
Modified:
    branches/gcc-5-branch/gcc/fortran/ChangeLog
    branches/gcc-5-branch/gcc/fortran/trans-array.c
    branches/gcc-5-branch/gcc/fortran/trans-expr.c
    branches/gcc-5-branch/gcc/testsuite/ChangeLog
    branches/gcc-5-branch/gcc/testsuite/gfortran.dg/allocate_with_source_14.f03

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