re PR java/24127 (ICE in libjava.compile/PR6865.java reported as "PASS" in testsuite.)
authorRanjit Mathew <rmathew@gcc.gnu.org>
Mon, 3 Oct 2005 17:30:38 +0000 (17:30 +0000)
committerRanjit Mathew <rmathew@gcc.gnu.org>
Mon, 3 Oct 2005 17:30:38 +0000 (17:30 +0000)
PR java/24127
* parse.y (method_header): Make the result of the rule a NULL_TREE
when a parsing error occurs.

From-SVN: r104899

gcc/java/ChangeLog
gcc/java/parse.y

index b227a68..549a742 100644 (file)
@@ -1,3 +1,9 @@
+2005-10-03  Ranjit Mathew  <rmathew@gcc.gnu.org>
+
+       PR java/24127
+       * parse.y (method_header): Make the result of the rule a NULL_TREE
+       when a parsing error occurs.
+
 2005-09-29  Tom Tromey  <tromey@redhat.com>
 
        PR java/24120:
index b728554..555541c 100644 (file)
@@ -1034,26 +1034,31 @@ method_header:
 |      type error
                {
                  yyerror ("Invalid method declaration, method name required");
+                 $$ = NULL_TREE;
                  RECOVER;
                }
 |      modifiers type error
                {
                  yyerror ("Identifier expected");
+                 $$ = NULL_TREE;
                  RECOVER;
                }
 |      VOID_TK error
                {
                  yyerror ("Identifier expected");
+                 $$ = NULL_TREE;
                  RECOVER;
                }
 |      modifiers VOID_TK error
                {
                  yyerror ("Identifier expected");
+                 $$ = NULL_TREE;
                  RECOVER;
                }
 |      modifiers error
                {
                  yyerror ("Invalid method declaration, return type required");
+                 $$ = NULL_TREE;
                  RECOVER;
                }
 ;