Fix logic error in Fortran OpenACC parsing
authorThomas Schwinge <thomas@codesourcery.com>
Mon, 27 Jul 2015 14:26:41 +0000 (16:26 +0200)
committerThomas Schwinge <tschwinge@gcc.gnu.org>
Mon, 27 Jul 2015 14:26:41 +0000 (16:26 +0200)
gcc/fortran/
* parse.c (parse_oacc_structured_block): Fix logic error.
Reported by Mikael Morin <mikael.morin@sfr.fr>.

From-SVN: r226246

gcc/fortran/ChangeLog
gcc/fortran/parse.c

index 0ed6b9bb9013fe2ea4ca864e9cd258b61acac863..e5b7681fa324b16525cbf0b76b10e4a8c0b53d47 100644 (file)
@@ -1,3 +1,8 @@
+2015-07-27  Thomas Schwinge  <thomas@codesourcery.com>
+
+       * parse.c (parse_oacc_structured_block): Fix logic error.
+       Reported by Mikael Morin <mikael.morin@sfr.fr>.
+
 2015-07-24  Mikael Morin  <mikael@gcc.gnu.org>
 
        PR fortran/64986
index 45ad63ff7ee3a8c4f7a0b4a4e27de7732b0c1c06..04b4c80d0e65430b8df4b9ecb8cb167f4a7995d1 100644 (file)
@@ -4383,8 +4383,10 @@ parse_oacc_structured_block (gfc_statement acc_st)
       if (st == ST_NONE)
        unexpected_eof ();
       else if (st != acc_end_st)
-       gfc_error ("Expecting %s at %C", gfc_ascii_statement (acc_end_st));
-      reject_statement ();
+       {
+         gfc_error ("Expecting %s at %C", gfc_ascii_statement (acc_end_st));
+         reject_statement ();
+       }
     }
   while (st != acc_end_st);