Commit a10da381 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/18918 (Eventually support Fortran 2008's coarrays [co-arrays])

2010-04-28  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        PR fortran/43919
        * simplify.c (simplify_cobound): Handle scalar coarrays.

2010-04-28  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        PR fortran/43919
        * gfortran.dg/coarray_11.f90: Add scalar-coarrays test case.

From-SVN: r158843
parent 91eace2b
2010-04-28 Tobias Burnus <burnus@net-b.de>
PR fortran/18918
PR fortran/43919
* simplify.c (simplify_cobound): Handle scalar coarrays.
2010-04-27 Tobias Burnus <burnus@net-b.de>
* gfc-internals.texi: Update copyright year.
......
......@@ -2936,6 +2936,13 @@ simplify_cobound (gfc_expr *array, gfc_expr *dim, gfc_expr *kind, int upper)
switch (ref->u.ar.type)
{
case AR_ELEMENT:
if (ref->next == NULL)
{
gcc_assert (ref->u.ar.as->corank > 0
&& ref->u.ar.as->rank == 0);
as = ref->u.ar.as;
goto done;
}
as = NULL;
continue;
......
2010-04-28 Tobias Burnus <burnus@net-b.de>
PR fortran/18918
PR fortran/43919
* gfortran.dg/coarray_11.f90: Add scalar-coarrays test case.
2010-04-28 Matthias Klose <doko@ubuntu.com>
* gcc.dg/plugin/plugin.exp: Run the plugindir tests.
......
......@@ -2,6 +2,7 @@
! { dg-options "-fcoarray=single -fdump-tree-original" }
!
! PR fortran/18918
! PR fortran/43919 for boundsTest()
!
! Coarray intrinsics
!
......@@ -52,5 +53,12 @@ if (lcobound(a,dim=3,kind=8) /= -3_8) call not_existing()
if (ucobound(a,dim=1,kind=2) /= 9_2) call not_existing()
end subroutine andanother
subroutine boundsTest()
implicit none
integer :: a[*] = 7
if (any (lcobound(a) /= [1])) call not_existing()
if (any (ucobound(a) /= [1])) call not_existing()
end subroutine boundsTest
! { dg-final { scan-tree-dump-times "not_existing" 0 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
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