diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index a3aa49dbcbf..0a7edea7041 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2011-01-02 Janus Weil + + PR fortran/46408 + * class.c (gfc_find_derived_vtab): Use EXEC_INIT_ASSIGN for __copy_ + routine. + Copyright (C) 2011 Free Software Foundation, Inc. diff --git a/gcc/fortran/class.c b/gcc/fortran/class.c index 27c7d23b68c..5b6851b49f3 100644 --- a/gcc/fortran/class.c +++ b/gcc/fortran/class.c @@ -548,7 +548,7 @@ gfc_find_derived_vtab (gfc_symbol *derived) copy->formal->next->sym = dst; /* Set up code. */ sub_ns->code = gfc_get_code (); - sub_ns->code->op = EXEC_ASSIGN; + sub_ns->code->op = EXEC_INIT_ASSIGN; sub_ns->code->expr1 = gfc_lval_expr_from_sym (dst); sub_ns->code->expr2 = gfc_lval_expr_from_sym (src); /* Set initializer. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index defb4945557..df5ce019c88 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-01-02 Janus Weil + + PR fortran/46408 + * gfortran.dg/class_19.f03: Adjust counting of __builtin_free. + 2011-01-02 Jakub Jelinek PR tree-optimization/47140 diff --git a/gcc/testsuite/gfortran.dg/class_19.f03 b/gcc/testsuite/gfortran.dg/class_19.f03 index 27ee7b4e2cb..78e5652a871 100644 --- a/gcc/testsuite/gfortran.dg/class_19.f03 +++ b/gcc/testsuite/gfortran.dg/class_19.f03 @@ -39,7 +39,7 @@ program main end program main -! { dg-final { scan-tree-dump-times "__builtin_free" 11 "original" } } +! { dg-final { scan-tree-dump-times "__builtin_free" 8 "original" } } ! { dg-final { cleanup-tree-dump "original" } } ! { dg-final { cleanup-modules "foo_mod" } }