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 b227a68f7e7b0df08fe5adc29c5319d807f4c1cc..549a742f398d55746cc2515aa42f5ea3841d2889 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 b728554fb92e013d64bb213942a8af662caad52d..555541c4bd4e6d52717c6c17c2bf2f17fff1a404 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;
                }
 ;