Commit 0b73eb81 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/52029 ([OOP] _copy should be PURE)

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

        PR fortran/52029
        * class.c (gfc_find_derived_vtab): Mark _copy function as pure.

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

        PR fortran/52029
        * gfortran.dg/class_49.f90: New.

From-SVN: r183770
parent 2419ff64
2012-01-31 Tobias Burnus <burnus@net-b.de>
PR fortran/52029
* class.c (gfc_find_derived_vtab): Mark _copy function as pure.
2012-01-31 Tobias Burnus <burnus@net-b.de>
PR fortran/52013
* class.c (get_unique_hashed_string): Adapt trim length.
(gfc_build_class_symbol) Encode also corank in the container name.
......
......@@ -717,6 +717,7 @@ gfc_find_derived_vtab (gfc_symbol *derived)
sub_ns->proc_name = copy;
copy->attr.flavor = FL_PROCEDURE;
copy->attr.subroutine = 1;
copy->attr.pure = 1;
copy->attr.if_source = IFSRC_DECL;
/* This is elemental so that arrays are automatically
treated correctly by the scalarizer. */
......
2012-01-31 Tobias Burnus <burnus@net-b.de>
PR fortran/52029
* gfortran.dg/class_49.f90: New.
2012-01-31 Tobias Burnus <burnus@net-b.de>
PR fortran/52013
* gfortran.dg/elemental_args_check_6.f90: New.
......
! { dg-do compile }
!
! PR fortran/52029
!
elemental subroutine foo()
type t
end type t
class(t), allocatable :: x
if (allocated(x)) i = 5
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment