Commit 627b82f2 by Janus Weil

re PR fortran/59228 (ICE-on-invalid with assumed type and ASYNCHRONOUS)

2013-11-23  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/59228
	* interface.c (compare_parameter): Check for array spec.

2013-11-23  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/59228
	* gfortran.dg/asynchronous_4.f90: New.

From-SVN: r205304
parent 5ed18204
2013-11-23 Janus Weil <janus@gcc.gnu.org>
PR fortran/59228
* interface.c (compare_parameter): Check for array spec.
2013-11-22 Andrew MacLeod <amacleod@redhat.com>
* trans.c: Add required include files from gimple.h.
......
......@@ -2092,7 +2092,7 @@ compare_parameter (gfc_symbol *formal, gfc_expr *actual,
&& (actual->symtree->n.sym->attr.asynchronous
|| actual->symtree->n.sym->attr.volatile_)
&& (formal->attr.asynchronous || formal->attr.volatile_)
&& actual->rank && !gfc_is_simply_contiguous (actual, true)
&& actual->rank && formal->as && !gfc_is_simply_contiguous (actual, true)
&& ((formal->as->type != AS_ASSUMED_SHAPE
&& formal->as->type != AS_ASSUMED_RANK && !formal->attr.pointer)
|| formal->attr.contiguous))
......
2013-11-23 Janus Weil <janus@gcc.gnu.org>
PR fortran/59228
* gfortran.dg/asynchronous_4.f90: New.
2013-11-22 Jakub Jelinek <jakub@redhat.com>
* c-c++-common/asan/no-redundant-instrumentation-7.c: Fix
......
! { dg-do compile }
!
! PR 59228: ICE with assumed type and ASYNCHRONOUS
!
! Contributed by Valery Weber <valeryweber@hotmail.com>
IMPLICIT NONE
interface
subroutine test(base)
TYPE(*), ASYNCHRONOUS :: base
end subroutine
end interface
CONTAINS
SUBROUTINE foo ( data )
REAL, DIMENSION( : ), ASYNCHRONOUS :: data
CALL test ( data ) ! { dg-error "Rank mismatch in argument" }
END SUBROUTINE
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