re PR fortran/57508 ([OOP] Intrinsic assignment+defined-assignment for comps: PROCEDURE attribute of '_F.DA0' conflicts with VARIABLE attribute)
2013-06-14 Tobias Burnus <burnus@net-b.de> PR fortran/57508 * resolve.c (get_temp_from_expr): Don't copy function result attributes to temporary. 2013-06-14 Tobias Burnus <burnus@net-b.de> PR fortran/57508 * gfortran.dg/defined_assignment_7.f90: New. From-SVN: r200089
This commit is contained in:
parent
ffe7516f00
commit
9d82744163
@ -1,3 +1,9 @@
|
||||
2013-06-14 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/57508
|
||||
* resolve.c (get_temp_from_expr): Don't copy function
|
||||
result attributes to temporary.
|
||||
|
||||
2013-06-14 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/57596
|
||||
|
@ -9295,6 +9295,10 @@ get_temp_from_expr (gfc_expr *e, gfc_namespace *ns)
|
||||
|
||||
/* Add the attributes and the arrayspec to the temporary. */
|
||||
tmp->n.sym->attr = gfc_expr_attr (e);
|
||||
tmp->n.sym->attr.function = 0;
|
||||
tmp->n.sym->attr.result = 0;
|
||||
tmp->n.sym->attr.flavor = FL_VARIABLE;
|
||||
|
||||
if (as)
|
||||
{
|
||||
tmp->n.sym->as = gfc_copy_array_spec (as);
|
||||
|
@ -1,3 +1,8 @@
|
||||
2013-06-14 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/57508
|
||||
* gfortran.dg/defined_assignment_7.f90: New.
|
||||
|
||||
2013-06-14 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/57599
|
||||
|
29
gcc/testsuite/gfortran.dg/defined_assignment_7.f90
Normal file
29
gcc/testsuite/gfortran.dg/defined_assignment_7.f90
Normal file
@ -0,0 +1,29 @@
|
||||
! { dg-compile }
|
||||
!
|
||||
! PR fortran/57508
|
||||
!
|
||||
module ForTrilinos_ref_counter
|
||||
type ref_counter
|
||||
contains
|
||||
procedure :: assign
|
||||
generic :: assignment(=) => assign
|
||||
end type
|
||||
contains
|
||||
subroutine assign (lhs, rhs)
|
||||
class (ref_counter), intent(inout) :: lhs
|
||||
class (ref_counter), intent(in) :: rhs
|
||||
end subroutine
|
||||
end module
|
||||
module FEpetra_BlockMap
|
||||
use ForTrilinos_ref_counter, only : ref_counter
|
||||
type :: Epetra_BlockMap
|
||||
type(ref_counter) :: counter
|
||||
end type
|
||||
contains
|
||||
function from_struct() result(new_Epetra_BlockMap)
|
||||
type(Epetra_BlockMap) :: new_Epetra_BlockMap
|
||||
end function
|
||||
type(Epetra_BlockMap) function create_arbitrary()
|
||||
create_arbitrary = from_struct()
|
||||
end function
|
||||
end module
|
Loading…
x
Reference in New Issue
Block a user