diff options
author | Tobias Burnus <burnus@net-b.de> | 2014-06-23 19:09:08 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2014-06-23 19:09:08 +0200 |
commit | b093626575a145de8d1fb6a4722156a17c313b52 (patch) | |
tree | c1ad85e9165621216f58f35bb22f0600608c8f8d /gcc | |
parent | e7402b3acc232144a730c5618d46b643eeae0f3e (diff) | |
download | gcc-b093626575a145de8d1fb6a4722156a17c313b52.zip gcc-b093626575a145de8d1fb6a4722156a17c313b52.tar.gz gcc-b093626575a145de8d1fb6a4722156a17c313b52.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/trans-decl.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/coarray_32.f90 | 18 |
4 files changed, 28 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 8a9316e..05df7c1 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -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 diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index f1a18c3..291dd1f 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -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); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e8eab59..7cdbc91 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 diff --git a/gcc/testsuite/gfortran.dg/coarray_32.f90 b/gcc/testsuite/gfortran.dg/coarray_32.f90 new file mode 100644 index 0000000..8e6dc54 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/coarray_32.f90 @@ -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" } } + |