diff options
Diffstat (limited to 'gcc/fortran/trans-stmt.c')
-rw-r--r-- | gcc/fortran/trans-stmt.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index 4f211975581..5dd7bafe452 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -1,5 +1,5 @@ /* Statement translation -- generate GCC trees from gfc_code. - Copyright (C) 2002-2013 Free Software Foundation, Inc. + Copyright (C) 2002-2014 Free Software Foundation, Inc. Contributed by Paul Brook <paul@nowt.org> and Steven Bosscher <s.bosscher@student.tudelft.nl> @@ -5144,10 +5144,7 @@ gfc_trans_allocate (gfc_code * code) if (ts->type == BT_DERIVED || UNLIMITED_POLY (e)) { - if (ts->type == BT_DERIVED) - vtab = gfc_find_derived_vtab (ts->u.derived); - else - vtab = gfc_find_intrinsic_vtab (ts); + vtab = gfc_find_vtab (ts); gcc_assert (vtab); gfc_init_se (&lse, NULL); lse.want_pointer = 1; @@ -5232,12 +5229,8 @@ gfc_trans_allocate (gfc_code * code) ppc = gfc_copy_expr (rhs); gfc_add_vptr_component (ppc); } - else if (rhs->ts.type == BT_DERIVED) - ppc = gfc_lval_expr_from_sym - (gfc_find_derived_vtab (rhs->ts.u.derived)); else - ppc = gfc_lval_expr_from_sym - (gfc_find_intrinsic_vtab (&rhs->ts)); + ppc = gfc_lval_expr_from_sym (gfc_find_vtab (&rhs->ts)); gfc_add_component_ref (ppc, "_copy"); ppc_code = gfc_get_code (EXEC_CALL); |