re PR fortran/34689 (libgomp.fortran/appendix-a/a.33.3.f90 -O (test for excess errors))
2008-01-06 Tobias Burnus <burnus@net-b.de> PR fortran/34689 * interface.c (compare_actual_formal): Fix intent(out) check for function result variables. 2008-01-06 Tobias Burnus <burnus@net-b.de> PR fortran/34689 * gfortran.dg/intent_out_4.f90: New. From-SVN: r131359
This commit is contained in:
parent
43db797998
commit
ac61ba6af2
@ -1,3 +1,9 @@
|
||||
2008-01-06 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/34689
|
||||
* interface.c (compare_actual_formal): Fix intent(out) check for
|
||||
function result variables.
|
||||
|
||||
2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR fortran/34387
|
||||
|
@ -1909,7 +1909,8 @@ compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal,
|
||||
|
||||
/* Check intent = OUT/INOUT for definable actual argument. */
|
||||
if ((a->expr->expr_type != EXPR_VARIABLE
|
||||
|| a->expr->symtree->n.sym->attr.flavor != FL_VARIABLE)
|
||||
|| (a->expr->symtree->n.sym->attr.flavor != FL_VARIABLE
|
||||
&& a->expr->symtree->n.sym->attr.flavor != FL_PROCEDURE))
|
||||
&& (f->sym->attr.intent == INTENT_OUT
|
||||
|| f->sym->attr.intent == INTENT_INOUT))
|
||||
{
|
||||
|
@ -1,3 +1,8 @@
|
||||
2008-01-06 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/34689
|
||||
* gfortran.dg/intent_out_4.f90: New.
|
||||
|
||||
2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR libfortran/34540
|
||||
|
18
gcc/testsuite/gfortran.dg/intent_out_4.f90
Normal file
18
gcc/testsuite/gfortran.dg/intent_out_4.f90
Normal file
@ -0,0 +1,18 @@
|
||||
! { dg-do compile }
|
||||
!
|
||||
! PR fortran/34689
|
||||
!
|
||||
! The following (cf. libgomp.fortran/appendix-a/a.33.3.f90)
|
||||
! was rejected because the intent check missed a FL_FUNCTION
|
||||
! for the result variable.
|
||||
!
|
||||
function test()
|
||||
implicit none
|
||||
integer :: test
|
||||
interface
|
||||
subroutine foo(a)
|
||||
integer(inout) :: a
|
||||
end subroutine foo
|
||||
end interface
|
||||
call foo(a)
|
||||
end function test
|
Loading…
x
Reference in New Issue
Block a user