re PR fortran/51995 ([OOP] Polymorphic class fails at runtime)

2012-01-25  Tobias Burnus  <burnus@net-b.de>

        PR fortran/51995
        * class.c (gfc_build_class_symbol): Fix invalid freeing
        issue with fclass->f2k_derived.

From-SVN: r183541
This commit is contained in:
Tobias Burnus 2012-01-25 23:21:14 +01:00 committed by Tobias Burnus
parent af92e38566
commit 5cfa7039f3
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2012-01-25 Tobias Burnus <burnus@net-b.de>
PR fortran/51995
* class.c (gfc_build_class_symbol): Fix invalid freeing
issue with fclass->f2k_derived.
2012-01-25 Tobias Burnus <burnus@net-b.de>
PR fortran/51995

View File

@ -422,7 +422,7 @@ gfc_build_class_symbol (gfc_typespec *ts, symbol_attribute *attr,
c->attr.pointer = 1;
}
else if (!fclass->f2k_derived)
fclass->f2k_derived = fclass->components->ts.u.derived->f2k_derived;
fclass->f2k_derived = gfc_get_namespace (NULL, 0);
/* Since the extension field is 8 bit wide, we can only have
up to 255 extension levels. */