diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2006-12-21 19:56:34 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2006-12-21 19:56:34 +0000 |
commit | 681150cdaa87e47d1cc8b57d6a29d73b3170343a (patch) | |
tree | 6c9a1f15d334ca9b05b16f1980a05210a9b1792f | |
parent | 54076f8b4496139a59e4129850b6f4c6c72baca4 (diff) | |
download | gcc-681150cdaa87e47d1cc8b57d6a29d73b3170343a.zip gcc-681150cdaa87e47d1cc8b57d6a29d73b3170343a.tar.gz gcc-681150cdaa87e47d1cc8b57d6a29d73b3170343a.tar.bz2 |
re PR fortran/30273 ([4.1 only] gfc_todo: Not Implemented: Unable to determine rank of expression)
2006-12-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30273
* dependency.c (gfc_check_dependency): There is no dependency
with EXPR_NULL so always return 0.
2006-12-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30273
* gfortran.dg/dependency_19.f90: New test.
From-SVN: r120117
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/dependency.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/dependency_19.f90 | 34 |
4 files changed, 46 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index c0dd40a..5d12d75 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,11 @@ 2006-12-21 Paul Thomas <pault@gcc.gnu.org> + PR fortran/30273 + * dependency.c (gfc_check_dependency): There is no dependency + with EXPR_NULL so always return 0. + +2006-12-21 Paul Thomas <pault@gcc.gnu.org> + PR fortran/30202 * trans-array.c (gfc_conv_function_call): Use parmse.expr for the nullifying of intent(out) arguments rather than the backend diff --git a/gcc/fortran/dependency.c b/gcc/fortran/dependency.c index f9ba445..53bf9e1 100644 --- a/gcc/fortran/dependency.c +++ b/gcc/fortran/dependency.c @@ -694,6 +694,7 @@ gfc_check_dependency (gfc_expr * expr1, gfc_expr * expr2, bool identical) return 0; case EXPR_CONSTANT: + case EXPR_NULL: return 0; case EXPR_ARRAY: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fb6666e..3a094a5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2006-12-21 Paul Thomas <pault@gcc.gnu.org> + PR fortran/30273 + * gfortran.dg/dependency_19.f90: New test. + +2006-12-21 Paul Thomas <pault@gcc.gnu.org> + PR fortran/30202 * gfortran.dg/alloc_comp_basics_3.f90: New test. diff --git a/gcc/testsuite/gfortran.dg/dependency_19.f90 b/gcc/testsuite/gfortran.dg/dependency_19.f90 new file mode 100644 index 0000000..b0af158 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/dependency_19.f90 @@ -0,0 +1,34 @@ +! { dg-do compile } +! Tests the fix for PR30273, in which the pointer assignment was +! wrongly determined to have dependence because NULL() was not +! recognised by the analysis. +! +! Contributed by Harald Anlauf <anlauf@gmx.de> +! +module gfcbug49 + implicit none + + type spot_t + integer, pointer :: vm(:,:,:) + end type spot_t + + type rc_t + integer :: n + type(spot_t), pointer :: spots(:) => NULL() + end type rc_t + +contains + + subroutine construct (rc, n) + type(rc_t), intent(out) :: rc + integer , intent(in) :: n + integer :: k + rc% n = n + allocate (rc% spots (n)) + forall (k=1:n) + rc% spots (k)% vm => NULL() ! gfortran didn't swallow this + end forall + end subroutine construct + +end module gfcbug49 +! { dg-final { cleanup-modules "gfcbug49" } } |