]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/18993 (incorrect parsing in fixed-form)
authorTobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
Wed, 15 Dec 2004 18:55:57 +0000 (19:55 +0100)
committerTobias Schlüter <tobi@gcc.gnu.org>
Wed, 15 Dec 2004 18:55:57 +0000 (19:55 +0100)
fortran/
PR fortran/18993
* match.c (gfc_match_if): Don't explicitly skip optional whitespace.
(gfc_match_nullify): Make sure that ')' is in front of the end of
statement.

testsuite/
PR fortran/18993
* gfotran.dg/nullify_1.f: New test.

From-SVN: r92209

gcc/fortran/ChangeLog
gcc/fortran/match.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/nullify_1.f [new file with mode: 0644]

index b701dc94068263bbe491fd162a0cae0d13a1b41d..e3b22558a44aad56b6d9edcb31638acb36bba045 100644 (file)
@@ -1,3 +1,10 @@
+2004-12-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
+
+       PR fortran/18993
+       * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
+       (gfc_match_nullify): Make sure that ')' is in front of the end of
+       statement.
+
 2004-12-14  Richard Henderson  <rth@redhat.com>
 
        * gfortran.h (gfc_expr.function.name): Make const.
index cf0c255524de7c20a015e730e8bd501fb827396c..825120f5ca98b377701ff903192e70fce735105c 100644 (file)
@@ -974,7 +974,7 @@ gfc_match_if (gfc_statement * if_type)
       return MATCH_YES;
     }
 
-  if (gfc_match (" then %t") == MATCH_YES)
+  if (gfc_match (" then%t") == MATCH_YES)
     {
       new_st.op = EXEC_IF;
       new_st.expr = expr;
@@ -1822,7 +1822,7 @@ gfc_match_nullify (void)
       tail->expr = p;
       tail->expr2 = e;
 
-      if (gfc_match_char (')') == MATCH_YES)
+      if (gfc_match (" )%t") == MATCH_YES)
        break;
       if (gfc_match_char (',') != MATCH_YES)
        goto syntax;
index 449213da5ac58028179de2b40e7553b9a9db28e5..58d4e787d15e889184826ff9dc75adfacbed53a5 100644 (file)
@@ -1,3 +1,8 @@
+2004-12-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
+
+       PR fortran/18993
+       * gfotran.dg/nullify_1.f: New test.
+
 2004-12-15  Richard Henderson  <rth@redhat.com>
 
        * gcc.target/i386/i386.exp: New harness.
diff --git a/gcc/testsuite/gfortran.dg/nullify_1.f b/gcc/testsuite/gfortran.dg/nullify_1.f
new file mode 100644 (file)
index 0000000..abf68c9
--- /dev/null
@@ -0,0 +1,11 @@
+C { dg-do compile }
+C PR 18993 
+C we didn't match the end of statement following NULLIFY ()
+C this lead to weird error messages
+      subroutine ordern( ) 
+      real, pointer :: aux(:,:) 
+C Nullify pointers 
+      nullify(aux)
+C Set default sizes for order N arrays
+      end subroutine ordern
+