Commit 84efddb2 by Daniel Franke Committed by Daniel Franke

re PR fortran/44457 (Missing ASYNCHRONOUS constraint check)

gcc/fortran/:
2010-06-10  Daniel Franke  <franke.daniel@gmail.com>

	PR fortran/44457
	* interface.c (compare_actual_formal): Reject actual arguments with
	array subscript passed to ASYNCHRONOUS dummys.

gcc/testsuite/:
2010-06-10  Daniel Franke  <franke.daniel@gmail.com>

	PR fortran/44457
	* gfortran.dg/asynchronous_3.f03

From-SVN: r160567
parent da604ebd
2010-06-10 Daniel Franke <franke.daniel@gmail.com>
PR fortran/44457
* interface.c (compare_actual_formal): Reject actual arguments with
array subscript passed to ASYNCHRONOUS dummys.
2010-06-10 Daniel Kraft <d@domob.eu> 2010-06-10 Daniel Kraft <d@domob.eu>
PR fortran/38936 PR fortran/38936
......
...@@ -2133,13 +2133,15 @@ compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal, ...@@ -2133,13 +2133,15 @@ compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal,
if ((f->sym->attr.intent == INTENT_OUT if ((f->sym->attr.intent == INTENT_OUT
|| f->sym->attr.intent == INTENT_INOUT || f->sym->attr.intent == INTENT_INOUT
|| f->sym->attr.volatile_) || f->sym->attr.volatile_
|| f->sym->attr.asynchronous)
&& gfc_has_vector_subscript (a->expr)) && gfc_has_vector_subscript (a->expr))
{ {
if (where) if (where)
gfc_error ("Array-section actual argument with vector subscripts " gfc_error ("Array-section actual argument with vector "
"at %L is incompatible with INTENT(OUT), INTENT(INOUT) " "subscripts at %L is incompatible with INTENT(OUT), "
"or VOLATILE attribute of the dummy argument '%s'", "INTENT(INOUT), VOLATILE or ASYNCHRONOUS attribute "
"of the dummy argument '%s'",
&a->expr->where, f->sym->name); &a->expr->where, f->sym->name);
return 0; return 0;
} }
......
2010-06-10 Daniel Franke <franke.daniel@gmail.com>
PR fortran/44457
* gfortran.dg/asynchronous_3.f03
2010-06-10 Changpeng Fang <changpeng.fang@amd.com> 2010-06-10 Changpeng Fang <changpeng.fang@amd.com>
PR middle-end/44185 PR middle-end/44185
......
! { dg-do "compile" }
!
! PR fortran/44457 - no array-subscript actual argument
! for an asynchronous dummy
!
integer :: a(10), sect(3)
sect = [1,2,3]
call f(a(sect)) ! { dg-error "incompatible" }
call f(a(::2))
contains
subroutine f(x)
integer, asynchronous :: x(:)
end subroutine f
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