trans-decl.c (gfc_trans_deferred_vars): Fix handling of explicit-size arrays with -fcoarray=lib.

gcc/fortran/
2014-06-23  Tobias Burnus  <burnus@net-b.de>

        * trans-decl.c (gfc_trans_deferred_vars): Fix handling of
        explicit-size arrays with -fcoarray=lib.

gcc/testsuite/
2014-06-23  Tobias Burnus  <burnus@net-b.de>

        * gfortran.dg/coarray_32.f90: New.

From-SVN: r211907
This commit is contained in:
Tobias Burnus 2014-06-23 19:09:08 +02:00 committed by Tobias Burnus
parent e7402b3acc
commit b093626575
4 changed files with 28 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2014-06-23 Tobias Burnus <burnus@net-b.de>
* trans-decl.c (gfc_trans_deferred_vars): Fix handling of
explicit-size arrays with -fcoarray=lib.
2014-06-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/33363

View File

@ -3870,7 +3870,7 @@ gfc_trans_deferred_vars (gfc_symbol * proc_sym, gfc_wrapped_block * block)
NULL_TREE);
continue;
}
else if (gfc_option.coarray != GFC_FCOARRAY_LIB)
else
{
gfc_save_backend_locus (&loc);
gfc_set_backend_locus (&sym->declared_at);

View File

@ -1,3 +1,7 @@
2014-06-23 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/coarray_32.f90: New.
2014-06-23 Paolo Carlini <paolo.carlini@oracle.com>
DR 577

View File

@ -0,0 +1,18 @@
! { dg-do compile }
! { dg-options "-fdump-tree-original -fcoarray=lib" }
!
real, allocatable :: values(:)[:]
allocate(values(1024)[*])
call laplacian(values)
contains
subroutine laplacian(rhs)
real, allocatable :: rhs(:)[:]
real :: local_laplacian(size(rhs))
local_laplacian=0.
end subroutine
end
! { dg-final { scan-tree-dump-times "ubound.. = " 1 "original" } }
! { dg-final { scan-tree-dump-times "size.. = " 2 "original" } }
! { dg-final { cleanup-tree-dump "original" } }