diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2005-11-11 04:44:16 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2005-11-11 04:44:16 +0000 |
commit | a5df14d4e57b9bad4095c48f09f7712fdcaffe14 (patch) | |
tree | 85d233bc91b50f52d627c1a4ab132a7ed7885909 /gcc/testsuite | |
parent | f2d186905aff4e0225e37b69a089f334290e806d (diff) | |
download | gcc-a5df14d4e57b9bad4095c48f09f7712fdcaffe14.zip gcc-a5df14d4e57b9bad4095c48f09f7712fdcaffe14.tar.gz gcc-a5df14d4e57b9bad4095c48f09f7712fdcaffe14.tar.bz2 |
re PR fortran/15976 (ICE: assertion failure in trans-array.c)
PR fortran/15976
* resolve.c (resolve_symbol): Disallow automatic arrays in module scope.
* gfortran.dg/automatic_module_variable.f90: New test.
Co-Authored-By: Steven G. Kargl <kargls@comcast.net>
From-SVN: r106777
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/automatic_module_variable.f90 | 16 |
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e2557a7..fa6d7b0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-11-10 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/15976 + * gfortran.dg/automatic_module_variable.f90: New test. + 2005-11-11 Kaz Kojima <kkojima@gcc.gnu.org> PR target/24445 diff --git a/gcc/testsuite/gfortran.dg/automatic_module_variable.f90 b/gcc/testsuite/gfortran.dg/automatic_module_variable.f90 new file mode 100644 index 0000000..0cf43f7 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/automatic_module_variable.f90 @@ -0,0 +1,16 @@ +! { dg-do compile } +! Tests fix for PR15976 +! +module sd + integer, parameter :: n = 20 + integer :: i(n) + integer :: j(m) ! { dg-error "cannot be automatic or assumed shape" } + integer, pointer :: p(:) + integer, allocatable :: q(:) +contains + function init (x, l) + integer :: x(l) + integer :: init(l) + init = x + end function init +end module sd |