re PR fortran/13201 (PARAMETER variables of nonconstant shape are accepted)
authorTobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
Fri, 9 Jul 2004 21:32:57 +0000 (23:32 +0200)
committerTobias Schlüter <tobi@gcc.gnu.org>
Fri, 9 Jul 2004 21:32:57 +0000 (23:32 +0200)
PR fortran/13201
* gfortran.dg/shape_1.f90: New test.

From-SVN: r84403

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/shape_1.f90 [new file with mode: 0644]

index 7548279c09a4fe9229c67bc93482d82d2b973301..915f8ce0f809a93df5096a243b1844a39660eaa3 100644 (file)
@@ -1,3 +1,8 @@
+2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
+
+       PR fortran/13201
+       * gfortran.dg/shape_1.f90: New test.
+
 2004-07-09  Zack Weinberg  <zack@codesourcery.com>
            Andrew Pinski  <apinski@apple.com>
 
diff --git a/gcc/testsuite/gfortran.dg/shape_1.f90 b/gcc/testsuite/gfortran.dg/shape_1.f90
new file mode 100644 (file)
index 0000000..aaf943f
--- /dev/null
@@ -0,0 +1,6 @@
+! { dg-do compile }
+! PR 13201 we used to not give an error in those cases
+subroutine foo(n) 
+  integer, parameter :: a(n) = 1 ! { dg-error "cannot be automatic" "automatic shape" }
+  integer, parameter :: z(:) = (/ 1,2,3 /) ! { dg-error "cannot be automatic" "assumed shape" }
+end subroutine