re PR fortran/58803 (Proc-pointer component: free_components deallocates twice pointer p->tb at symbol.c:2068)

2013-10-21  Tobias Burnus  <burnus@net-b.de>

        PR fortran/58803
        * decl.c (match_ppc_decl): Prevent later
        double free.

2013-10-21  Tobias Burnus  <burnus@net-b.de>

        PR fortran/58803
        * gfortran.dg/proc_ptr_comp_38.f90: New.

From-SVN: r203909
This commit is contained in:
Tobias Burnus 2013-10-21 21:39:19 +02:00 committed by Tobias Burnus
parent 4d64880731
commit 2be03814e4
4 changed files with 31 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2013-10-21 Tobias Burnus <burnus@net-b.de>
PR fortran/58803
* decl.c (match_ppc_decl): Prevent later
double free.
2013-10-17 Andrew MacLeod <amacleod@redhat.com>
* trans-openmp.c: Include omp-low.h.

View File

@ -5055,7 +5055,14 @@ match_ppc_decl (void)
if (!gfc_add_proc (&c->attr, name, NULL))
return MATCH_ERROR;
c->tb = tb;
if (num == 1)
c->tb = tb;
else
{
c->tb = XCNEW (gfc_typebound_proc);
c->tb->where = gfc_current_locus;
*c->tb = *tb;
}
/* Set interface. */
if (proc_if != NULL)

View File

@ -1,3 +1,8 @@
2013-10-21 Tobias Burnus <burnus@net-b.de>
PR fortran/58803
* gfortran.dg/proc_ptr_comp_38.f90: New.
2013-10-21 Marek Polacek <polacek@redhat.com>
PR middle-end/58809

View File

@ -0,0 +1,12 @@
! { dg-do compile }
!
! PR fortran/58803
!
! Contributed by Vittorio Zecca
!
! Was before ICEing due to a double free
!
type t
procedure(real), pointer, nopass :: f1, f2
end type
end