re PR fortran/46408 ([OOP] Segfault when running gfortran.dg/class_allocate_6.f03)

2011-01-02  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/46408
	* class.c (gfc_find_derived_vtab): Use EXEC_INIT_ASSIGN for __copy_
	routine.


2011-01-02  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/46408
	* gfortran.dg/class_19.f03: Adjust counting of __builtin_free.

From-SVN: r168409
This commit is contained in:
Janus Weil 2011-01-02 22:01:50 +01:00
parent 9ad2c58f86
commit 2e85ae0d6d
4 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2011-01-02 Janus Weil <janus@gcc.gnu.org>
PR fortran/46408
* class.c (gfc_find_derived_vtab): Use EXEC_INIT_ASSIGN for __copy_
routine.
Copyright (C) 2011 Free Software Foundation, Inc.

View File

@ -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. */

View File

@ -1,3 +1,8 @@
2011-01-02 Janus Weil <janus@gcc.gnu.org>
PR fortran/46408
* gfortran.dg/class_19.f03: Adjust counting of __builtin_free.
2011-01-02 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/47140

View File

@ -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" } }