re PR fortran/15051 (Incorrect error for empty interface block)
authorTobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
Fri, 14 May 2004 13:26:03 +0000 (15:26 +0200)
committerTobias Schlüter <tobi@gcc.gnu.org>
Fri, 14 May 2004 13:26:03 +0000 (15:26 +0200)
testsuite:

PR fortran/15051
* gfortran.fortran-torture/compile/empty_interface_1.f90: New
test.

fortran:

        PR fortran/15051
* parse.c (parse_interface): Allow empty INTERFACE, remove
        seen_body.

Also added ChangeLog entry missing from previous commit, removed umlaut from ChangeLog, and fixed previous entry to use tabs.

From-SVN: r81841

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

index efd2a60659c8822c3a9200bda43a936b8b614b39..ab9f8ba48235e486a0852d44506b640f26535eda 100644 (file)
@@ -1,8 +1,30 @@
-2004-04-22  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
-
-       PR fortran/14568
-       * trans-decl.c (generate_local_decl): Don't warn for unused
-       variables which are in common blocks. 
+2004-05-08  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
+
+        PR fortran/15051
+       * parse.c (parse_interface): Allow empty INTERFACE, remove
+        seen_body.
+
+2004-05-08  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
+
+       * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
+       decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
+       expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
+       intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
+       matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
+       primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
+       trans-array.c, trans-array.h, trans-common.c, trans-const.c,
+       trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
+       trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
+       trans-types.h, trans.c, trans.h: Update copyright years and
+       boilerplate.
+       * data.c: Likewise, also removed two whitespace-only lines.
+       * gfortranspec.c, lang.opt: Update copyright years.
+
+2004-04-22  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
+
+       PR fortran/14568
+       * trans-decl.c (generate_local_decl): Don't warn for unused
+        variables which are in common blocks. 
 
 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
 
index 00f29899c31de4831271ec95151f96c0123aae9e..1ab5b6aa5cdf36f714842f09b82ce1e585c9c0b2 100644 (file)
@@ -1409,7 +1409,6 @@ parse_interface (void)
   gfc_interface_info save;
   gfc_state_data s1, s2;
   gfc_statement st;
-  int seen_body;
 
   accept_statement (ST_INTERFACE);
 
@@ -1420,7 +1419,6 @@ parse_interface (void)
         || current_interface.type == INTERFACE_USER_OP) ? gfc_new_block : NULL;
 
   push_state (&s1, COMP_INTERFACE, sym);
-  seen_body = 0;
   current_state = COMP_NONE;
 
 loop:
@@ -1446,7 +1444,6 @@ loop:
 
     case ST_MODULE_PROC:       /* The module procedure matcher makes
                                   sure the context is correct.  */
-      seen_body = 1;
       accept_statement (st);
       gfc_free_namespace (gfc_current_ns);
       goto loop;
@@ -1512,8 +1509,6 @@ decl:
       goto decl;
     }
 
-  seen_body = 1;
-
   current_interface = save;
   gfc_add_interface (prog_unit);
 
@@ -1521,9 +1516,6 @@ decl:
   goto loop;
 
 done:
-  if (!seen_body)
-    gfc_error ("INTERFACE block at %C is empty");
-
   pop_state ();
 }
 
index c3a62881facbbe870ffbb545d4f69ee4a072edd0..6baf19a46ee2a5ecc4a3c4563e202042f2a528e6 100644 (file)
@@ -1,3 +1,9 @@
+2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
+
+       PR fortran/15051
+       * gfortran.fortran-torture/compile/empty_interface_1.f90: New
+       test.
+
 2004-05-14  Bud Davis  <bdavis9659@comcast.net>
 
        PR fortran/15149
diff --git a/gcc/testsuite/gfortran.fortran-torture/compile/empty_interface_1.f90 b/gcc/testsuite/gfortran.fortran-torture/compile/empty_interface_1.f90
new file mode 100644 (file)
index 0000000..d908954
--- /dev/null
@@ -0,0 +1,4 @@
+! Program to test empty interfaces PR15051
+INTERFACE leer
+END INTERFACE
+END