diff options
author | Tobias Burnus <burnus@net-b.de> | 2014-07-15 07:36:35 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2014-07-15 07:36:35 +0200 |
commit | 80def9087092a60b4f5f2ca952b3d0eb8e73cc8d (patch) | |
tree | 10ecafe29d2747f1a80164b12738ca9bd6668da3 /gcc/testsuite | |
parent | 4228f9328c9a7bd0cb78e167cecb5a3fb774fb9c (diff) | |
download | gcc-80def9087092a60b4f5f2ca952b3d0eb8e73cc8d.zip gcc-80def9087092a60b4f5f2ca952b3d0eb8e73cc8d.tar.gz gcc-80def9087092a60b4f5f2ca952b3d0eb8e73cc8d.tar.bz2 |
symbol.c (check_conflict): Add codimension conflict with pointer; fix cray-pointee check.
2014-06-15 Tobias Burnus <burnus@net-b.de>
gcc/fortran/
* symbol.c (check_conflict): Add codimension conflict with
pointer; fix cray-pointee check.
gcc/testsuite/
* gfortran.dg/coarray_34.f90: New.
* gfortran.dg/coarray_6.f90: Update test case.
From-SVN: r212540
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/coarray_34.f90 | 26 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/coarray_6.f90 | 2 |
3 files changed, 32 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0a7e567..2f25963 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-06-15 Tobias Burnus <burnus@net-b.de> + + * gfortran.dg/coarray_34.f90: New. + * gfortran.dg/coarray_6.f90: Update test case. + 2014-07-14 Richard Biener <rguenther@suse.de> PR tree-optimization/61779 diff --git a/gcc/testsuite/gfortran.dg/coarray_34.f90 b/gcc/testsuite/gfortran.dg/coarray_34.f90 new file mode 100644 index 0000000..f2bc910 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/coarray_34.f90 @@ -0,0 +1,26 @@ +! { dg-do compile } +! { dg-options "-fcoarray=single" } +! +use iso_fortran_env +implicit none + +type t + integer, pointer :: caf2[:] ! { dg-error "must be allocatable with deferred shape" } +end type t + +integer, pointer :: caf[*] ! { dg-error "POINTER attribute conflicts with CODIMENSION attribute" } + +type t2 + type(lock_type), pointer :: lock_it ! { dg-error "Component lock_it at .1. of type LOCK_TYPE must have a codimension or be a subcomponent of a coarray, which is not possible as the component has the pointer attribute" } +end type t2 +type(t2) :: caf3[*] + +type t3 + type(lock_type) :: x +end type t3 + +type t4 + type(t3), pointer :: y ! { dg-error "Pointer component y at .1. has a noncoarray subcomponent of type LOCK_TYPE, which must have a codimension or be a subcomponent of a coarray" } +end type t4 + +end diff --git a/gcc/testsuite/gfortran.dg/coarray_6.f90 b/gcc/testsuite/gfortran.dg/coarray_6.f90 index f44ac01..d30567a 100644 --- a/gcc/testsuite/gfortran.dg/coarray_6.f90 +++ b/gcc/testsuite/gfortran.dg/coarray_6.f90 @@ -32,7 +32,7 @@ end module m subroutine bar() integer, parameter :: a[*] = 4 ! { dg-error "PARAMETER attribute conflicts with CODIMENSION" } - integer, pointer :: b[:] ! { dg-error "is not ALLOCATABLE, SAVE nor a dummy" } + integer :: b[*] ! { dg-error "is not ALLOCATABLE, SAVE nor a dummy" } end subroutine bar subroutine vol() |