mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-05 17:30:58 +08:00
re PR fortran/46411 (MOVE_ALLOC wrongly rejected as impure)
2010-11-10 Tobias Burnus <burnus@net-b.de> PR fortran/46411 * intrinsic.c (gfc_intrinsic_sub_interface): Check for attr.pure and not for attr.elemental. * intrinsic.texi (move_alloc): Document as being pure. 2010-11-10 Tobias Burnus <burnus@net-b.de> PR fortran/46411 * gfortran.dg/intrinsic_7.f90: New. From-SVN: r166550
This commit is contained in:
parent
95b53b576b
commit
1d3a84ce03
@ -1,3 +1,10 @@
|
||||
2010-11-10 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/46411
|
||||
* intrinsic.c (gfc_intrinsic_sub_interface): Check for attr.pure
|
||||
and not for attr.elemental.
|
||||
* intrinsic.texi (move_alloc): Document as being pure.
|
||||
|
||||
2010-11-10 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/46244
|
||||
|
@ -4193,7 +4193,7 @@ gfc_intrinsic_sub_interface (gfc_code *c, int error_flag)
|
||||
c->resolved_sym->attr.elemental = isym->elemental;
|
||||
}
|
||||
|
||||
if (gfc_pure (NULL) && !isym->elemental)
|
||||
if (gfc_pure (NULL) && !isym->pure)
|
||||
{
|
||||
gfc_error ("Subroutine call to intrinsic '%s' at %L is not PURE", name,
|
||||
&c->loc);
|
||||
|
@ -8977,7 +8977,7 @@ end program
|
||||
Fortran 2003 and later
|
||||
|
||||
@item @emph{Class}:
|
||||
Subroutine
|
||||
Pure subroutine
|
||||
|
||||
@item @emph{Syntax}:
|
||||
@code{CALL MOVE_ALLOC(FROM, TO)}
|
||||
|
@ -1,3 +1,8 @@
|
||||
2010-11-10 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/46411
|
||||
* gfortran.dg/intrinsic_7.f90: New.
|
||||
|
||||
2010-11-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
||||
|
||||
* g++.dg/abi/rtti3.C: Scan for .weakext on alpha*-dec-osf*.
|
||||
|
13
gcc/testsuite/gfortran.dg/intrinsic_7.f90
Normal file
13
gcc/testsuite/gfortran.dg/intrinsic_7.f90
Normal file
@ -0,0 +1,13 @@
|
||||
! { dg-do compile }
|
||||
!
|
||||
! PR fortran/46411
|
||||
!
|
||||
! MOVE_ALLOC and other non-elemental but pure
|
||||
! procedures where regarded as impure.
|
||||
!
|
||||
|
||||
pure subroutine test()
|
||||
integer, allocatable :: a, b
|
||||
allocate(a,b)
|
||||
call move_alloc(a,b)
|
||||
end subroutine test
|
Loading…
x
Reference in New Issue
Block a user