re PR java/5942 (tree check failure when compiling Classpath with strictfp StrictMath class)

Fix for PR java/5942:
	* parse.y (init_src_parse): Added sanity check.
	* parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
	elements, not 11.

From-SVN: r51397
This commit is contained in:
Tom Tromey 2002-03-26 18:52:34 +00:00 committed by Tom Tromey
parent a2cbcfe560
commit c673d06f2a
3 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2002-03-26 Tom Tromey <tromey@redhat.com>
Fix for PR java/5942:
* parse.y (init_src_parse): Added sanity check.
* parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
elements, not 11.
2002-03-22 Mark Wielaard <mark@klomp.org>
Fix for PR java/5368:

View File

@ -762,7 +762,7 @@ struct parser_ctxt {
/* This section is defined only if we compile jc1 */
#ifndef JC1_LITE
tree modifier_ctx [11]; /* WFL of modifiers */
tree modifier_ctx [12]; /* WFL of modifiers */
tree class_type; /* Current class */
tree function_decl; /* Current function decl, save/restore */

View File

@ -16013,6 +16013,11 @@ init_src_parse ()
{
/* Register roots with the garbage collector. */
ggc_add_tree_root (src_parse_roots, sizeof (src_parse_roots) / sizeof(tree));
/* Sanity check; we've been bit by this before. */
if (sizeof (ctxp->modifier_ctx) / sizeof (tree) !=
MODIFIER_TK - PUBLIC_TK)
abort ();
}