This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PR java/24127: ICE in libjava.compile/PR6865.java


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

  Here is a simple fix for the ICE reported in PR24127 while
compiling the testcase for PR6865. The fix is to make the result
of the rule a NULL_TREE when an error occurs.

Tested on i686-pc-linux-gnu, Jacks included. No changes.
Verified manually that the testcase doesn't cause the compiler
to ICE any more.

OK for mainline?

Thanks,
Ranjit.

- --
Ranjit Mathew      Email: rmathew AT gmail DOT com

Bangalore, INDIA.    Web: http://ranjitmathew.hostingzero.com/


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDPPB8Yb1hx2wRS48RAm1yAJ97zXU3R8fi3Fkj3Y/gpF5eA1FeSwCfYtFC
4cCoSuQkbmb5/uEqbWchRMw=
=7FVi
-----END PGP SIGNATURE-----
Index: ChangeLog
from  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.

Index: parse.y
===================================================================
--- parse.y	2005-09-30 12:33:46.000000000 +0530
+++ parse.y	2005-09-30 12:34:43.000000000 +0530
@@ -1035,4 +1035,5 @@ method_header:
 		{
 		  yyerror ("Invalid method declaration, method name required");
+		  $$ = NULL_TREE;
 		  RECOVER;
 		}
@@ -1040,4 +1041,5 @@ method_header:
 		{
 		  yyerror ("Identifier expected");
+		  $$ = NULL_TREE;
 		  RECOVER;
 		}
@@ -1045,4 +1047,5 @@ method_header:
 		{
 		  yyerror ("Identifier expected");
+		  $$ = NULL_TREE;
 		  RECOVER;
 		}
@@ -1050,4 +1053,5 @@ method_header:
 		{
 		  yyerror ("Identifier expected");
+		  $$ = NULL_TREE;
 		  RECOVER;
 		}
@@ -1055,4 +1059,5 @@ method_header:
 		{
 		  yyerror ("Invalid method declaration, return type required");
+		  $$ = NULL_TREE;
 		  RECOVER;
 		}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]