aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorTobias Burnus <burnus@gcc.gnu.org>2015-01-02 14:34:58 +0100
committerTobias Burnus <burnus@gcc.gnu.org>2015-01-02 14:34:58 +0100
commit213ab0a6c49f10069615b98d38bb794f844cf433 (patch)
treeaaed31262b527da51678b25c953076b79c972526 /gcc/testsuite
parent4294c0935c186a724f044c36ca9693a7138853ae (diff)
downloadgcc-213ab0a6c49f10069615b98d38bb794f844cf433.zip
gcc-213ab0a6c49f10069615b98d38bb794f844cf433.tar.gz
gcc-213ab0a6c49f10069615b98d38bb794f844cf433.tar.bz2
trans-decl.c (gfc_build_qualified_array): Fix coarray tokens for module coarrays with -fcoarray=lib.
2015-01-02 Tobias Burnus <burnus@net-b.de> * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens for module coarrays with -fcoarray=lib. 2015-01-02 Tobias Burnus <burnus@net-b.de> * gfortran.dg/coarray/codimension_2.f90: New. * gfortran.dg/coarray/codimension_2a.f90: New. * gfortran.dg/coarray_35.f90: New. * gfortran.dg/coarray_35a.f90: New. From-SVN: r219142
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog9
-rw-r--r--gcc/testsuite/gfortran.dg/coarray/codimension_2.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/coarray/codimension_2a.f9026
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_35.f9017
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_35a.f9028
5 files changed, 93 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 44bc6f2..543cec6 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,9 +1,16 @@
+2015-01-02 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/coarray/codimension_2.f90: New.
+ * gfortran.dg/coarray/codimension_2a.f90: New.
+ * gfortran.dg/coarray_35.f90: New.
+ * gfortran.dg/coarray_35a.f90: New.
+
2015-01-02 Janus Weil <janus@gcc.gnu.org>
PR fortran/60507
* gfortran.dg/dummy_procedure_11: New.
-Copyright (C) 2014 Free Software Foundation, Inc.
+Copyright (C) 2015 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
diff --git a/gcc/testsuite/gfortran.dg/coarray/codimension_2.f90 b/gcc/testsuite/gfortran.dg/coarray/codimension_2.f90
new file mode 100644
index 0000000..b211f9b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray/codimension_2.f90
@@ -0,0 +1,14 @@
+! { dg-do link }
+! { dg-additional-sources codimension_2a.f90 }
+!
+! To be used with codimension_2a.f90
+! Check that the coarray declared in the module is accessible
+! by doing a link test
+!
+! Contributed by Alessandro Fanfarillo.
+!
+module global_coarrays
+ implicit none
+ integer,parameter :: n=10
+ integer :: b(10)[*]
+end module global_coarrays
diff --git a/gcc/testsuite/gfortran.dg/coarray/codimension_2a.f90 b/gcc/testsuite/gfortran.dg/coarray/codimension_2a.f90
new file mode 100644
index 0000000..8eb472c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray/codimension_2a.f90
@@ -0,0 +1,26 @@
+! { dg-do compile { target { ! *-*-* } } }
+! SKIP THIS FILE
+!
+! Used by codimension_2.f90
+!
+! Check that the coarray declared in the module is accessible
+! by doing a link test
+!
+! Contributed by Alessandro Fanfarillo.
+!
+program testmod
+ use global_coarrays
+ implicit none
+
+ integer :: me
+
+ me = this_image()
+
+ b = me
+
+ if(me==1) then
+ b(:) = b(:)[2]
+ write(*,*) b
+ end if
+
+end program testmod
diff --git a/gcc/testsuite/gfortran.dg/coarray_35.f90 b/gcc/testsuite/gfortran.dg/coarray_35.f90
new file mode 100644
index 0000000..e65f8fe
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray_35.f90
@@ -0,0 +1,17 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=lib" }
+!
+! To be used with coarray_35a.f90
+! Check that the coarray declared in the module is accessible
+! by checking the assembler name
+!
+! Contributed by Alessandro Fanfarillo.
+!
+module global_coarrays
+ implicit none
+ integer,parameter :: n=10
+ integer :: b(10)[*]
+end module global_coarrays
+
+! Check for the symbol of the coarray token (w/o system-dependend prefix)
+! { dg-final { scan-assembler "caf_token__global_coarrays_MOD_b" } }
diff --git a/gcc/testsuite/gfortran.dg/coarray_35a.f90 b/gcc/testsuite/gfortran.dg/coarray_35a.f90
new file mode 100644
index 0000000..eeeb289
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray_35a.f90
@@ -0,0 +1,28 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=lib" }
+! { dg-compile-aux-modules "coarray_35.f90" }
+!
+! Check that the coarray declared in the module is accessible
+! by checking the assembler name
+!
+! Contributed by Alessandro Fanfarillo.
+!
+program testmod
+ use global_coarrays
+ implicit none
+
+ integer :: me
+
+ me = this_image()
+
+ b = me
+
+ if(me==1) then
+ b(:) = b(:)[2]
+ write(*,*) b
+ end if
+
+end program testmod
+
+! Check for the symbol of the coarray token (w/o system-dependend prefix)
+! { dg-final { scan-assembler "caf_token__global_coarrays_MOD_b" } }