aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2011-05-19 22:53:33 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2011-05-19 22:53:33 +0200
commit4409de247c778276c0445f3d9f8817562f152b78 (patch)
treeca76ae70170c060df3f7975deb2b3d441d0d1798 /gcc/testsuite/gfortran.dg
parent664e12c1265280786f83d8fd1ec1ebbf50c153c0 (diff)
downloadgcc-4409de247c778276c0445f3d9f8817562f152b78.zip
gcc-4409de247c778276c0445f3d9f8817562f152b78.tar.gz
gcc-4409de247c778276c0445f3d9f8817562f152b78.tar.bz2
re PR fortran/18918 (Eventually support Fortran 2008's coarrays [co-arrays])
2011-06-19 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * trans-types.c (gfc_get_element_type): Handle scalar coarrays. (gfc_get_nodesc_array_type): Make a variant-type copy for scalar coarrays. * trans.c (gfc_build_array_ref): Return original type not * variant copy for scalar coarrays. * trans-array.c (gfc_conv_array_ref): Ditto. 2011-06-19 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * gfortran.dg/coarray_21.f90: New. From-SVN: r173920
Diffstat (limited to 'gcc/testsuite/gfortran.dg')
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_21.f9027
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/coarray_21.f90 b/gcc/testsuite/gfortran.dg/coarray_21.f90
new file mode 100644
index 0000000..8aa0aa6
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray_21.f90
@@ -0,0 +1,27 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=single" }
+!
+! PR fortran/18918
+!
+! Before scalar coarrays weren't regarded as scalar in the ME.
+!
+module mod_reduction
+ real :: g[*]
+contains
+ subroutine caf_reduce(x)
+ real, intent(in) :: x
+ g = x ! << used to ICE
+ end
+end module
+
+program test
+ integer, parameter :: size = 4000
+ type :: pct
+ integer, allocatable :: data(:,:)
+ end type
+ type(pct) :: picture[*]
+ allocate(picture%data(size, size))
+end program test
+
+
+! { dg-final { cleanup-modules "mod_reduction" } }