Commit abfc7377 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/55272 (ICE on passing coarray argument between files)

2012-11-12  Tobias Burnus  <burnus@net-b.de>

        PR fortran/55272
        * module.c (mio_array_spec): Correctly handle coarray
        scalars.

2012-11-12  Tobias Burnus  <burnus@net-b.de>

        PR fortran/55272
        * gfortran.dg/coarray_29_1.f90: New.
        * gfortran.dg/coarray_29_2.f90: New.

From-SVN: r193429
parent 3b4adfb3
2012-11-12 Tobias Burnus <burnus@net-b.de>
PR fortran/55272
* module.c (mio_array_spec): Correctly handle coarray
scalars.
2012-11-07 Tobias Schlüter <tobi@gcc.gnu.org> 2012-11-07 Tobias Schlüter <tobi@gcc.gnu.org>
PR fortran/51727 PR fortran/51727
......
...@@ -2395,7 +2395,7 @@ mio_array_spec (gfc_array_spec **asp) ...@@ -2395,7 +2395,7 @@ mio_array_spec (gfc_array_spec **asp)
if (iomode == IO_INPUT && as->corank) if (iomode == IO_INPUT && as->corank)
as->cotype = (as->type == AS_DEFERRED) ? AS_DEFERRED : AS_EXPLICIT; as->cotype = (as->type == AS_DEFERRED) ? AS_DEFERRED : AS_EXPLICIT;
if (as->rank > 0) if (as->rank + as->corank > 0)
for (i = 0; i < as->rank + as->corank; i++) for (i = 0; i < as->rank + as->corank; i++)
{ {
mio_expr (&as->lower[i]); mio_expr (&as->lower[i]);
......
2012-11-12 Tobias Burnus <burnus@net-b.de>
PR fortran/55272
* gfortran.dg/coarray_29_1.f90: New.
* gfortran.dg/coarray_29_2.f90: New.
2012-11-12 Bin Cheng <bin.cheng@arm.com> 2012-11-12 Bin Cheng <bin.cheng@arm.com>
* gcc.dg/hoist-register-pressure-3.c: New test. * gcc.dg/hoist-register-pressure-3.c: New test.
......
! { dg-do compile }
! { dg-options "-fcoarray=single" }
! To be used by coarray_29_2.f90
! PR fortran/55272
module co_sum_module
implicit none
contains
subroutine co_sum(scalar)
integer scalar[*]
end subroutine
end module
! DO NOT CLEAN UP THE MODULE FILE - coarray_29_2.f90 does it.
! { dg-final { keep-modules "" } }
! { dg-compile }
! { dg-options "-fcoarray=single" }
! Requires that coarray_29.f90 has been compiled before
! and that, thus, co_sum_module is available
! PR fortran/55272
!
! Contributed by Damian Rouson
program main
use co_sum_module
implicit none
integer score[*]
call co_sum(score)
end program
! { dg-final { cleanup-modules "co_sum_module" } }
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