expr.c (check_inquiry): Remove bogus tests.
authorPaul Brook <paul@codesourcery.com>
Sun, 23 May 2004 23:52:18 +0000 (23:52 +0000)
committerPaul Brook <pbrook@gcc.gnu.org>
Sun, 23 May 2004 23:52:18 +0000 (23:52 +0000)
* expr.c (check_inquiry): Remove bogus tests.
testsuite/
* gfortran.fortran-torture/compile/inquiry_1.f90: New test.

From-SVN: r82177

gcc/fortran/ChangeLog
gcc/fortran/expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.fortran-torture/compile/inquiry_1.f90 [new file with mode: 0644]

index 8338de9bc6c76d118124ec8a427afe96195a2947..c9a4f7decd5eca3e2447b9c7ccd1d167cfd38bbc 100644 (file)
@@ -1,3 +1,7 @@
+2004-05-25  Paul Brook  <paul@codesourcery.com>
+
+       * expr.c (check_inquiry): Remove bogus tests.
+
 2004-05-23  Paul Brook  <paul@codesourcery.com>
 
        PR fortran/13773
index 1546dec2e0909e8f97c818d8b9a9af6f99c45345..122ba38ff611a70f65c0be15278793d98c3852ea 100644 (file)
@@ -1273,15 +1273,6 @@ check_inquiry (gfc_expr * e)
 
   int i;
 
-  /* These functions must have exactly one argument.  */
-  if (e->value.function.actual == NULL
-      || e->value.function.actual->next != NULL)
-    return FAILURE;
-
-  if (e->value.function.name != NULL
-      && e->value.function.name[0] != '\0')
-    return FAILURE;
-
   name = e->symtree->n.sym->name;
 
   for (i = 0; inquiry_function[i]; i++)
index 82101e4804c720ede87fe295f0508dc5d56ae377..d32a76d7866671642ae89bd3cd0e664ccee3be7d 100644 (file)
@@ -1,3 +1,7 @@
+2004-05-25  Paul Brook  <paul@codesourcery.com>
+
+       * gfortran.fortran-torture/compile/inquiry_1.f90: New test.
+
 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/15165
diff --git a/gcc/testsuite/gfortran.fortran-torture/compile/inquiry_1.f90 b/gcc/testsuite/gfortran.fortran-torture/compile/inquiry_1.f90
new file mode 100644 (file)
index 0000000..12d67fc
--- /dev/null
@@ -0,0 +1,8 @@
+! Check that inquiry functions are allowed as specification expressions.
+subroutine inquiry(x1)
+  implicit none
+  real, dimension(1:), intent(out) :: x1
+  real, dimension(1:size(x1)) :: x3
+  x3 = 0
+  x1 = x3
+end subroutine