re PR java/2066 (Source parser segfault in resolve_package)

2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>

	* parse.y (qualify_ambiguous_name): Broaden `length'
	recognition. Help MODIFY_EXPR be resolved as expression names.
	Fixes PR java/2066. Fixes PR java/2400.

(http://gcc.gnu.org/ml/gcc-patches/2001-03/msg01935.html)

From-SVN: r40938
This commit is contained in:
Alexandre Petit-Bianco 2001-03-28 11:22:05 -08:00 committed by Alexandre Petit-Bianco
parent 0f5c1ee409
commit 883e9882ff
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (qualify_ambiguous_name): Broaden `length'
recognition. Help MODIFY_EXPR be resolved as expression names.
Fixes PR java/2066. Fixes PR java/2400.
2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
* jvgenmain.c (do_mangle_classname): End string constant with '\0'.

View File

@ -10891,7 +10891,7 @@ qualify_ambiguous_name (id)
expression name. If we saw a NEW_ARRAY_EXPR before and want to
address length, it is OK. */
else if ((decl = lookup_field_wrapper (ptr_type, name))
|| (new_array_found && name == length_identifier_node))
|| name == length_identifier_node)
{
RESOLVE_EXPRESSION_NAME_P (qual_wfl) = 1;
QUAL_RESOLUTION (qual) = (new_array_found ? NULL_TREE : decl);
@ -10916,7 +10916,8 @@ qualify_ambiguous_name (id)
/* Method call, array references and cast are expression name */
else if (TREE_CODE (QUAL_WFL (qual)) == CALL_EXPR
|| TREE_CODE (QUAL_WFL (qual)) == ARRAY_REF
|| TREE_CODE (QUAL_WFL (qual)) == CONVERT_EXPR)
|| TREE_CODE (QUAL_WFL (qual)) == CONVERT_EXPR
|| TREE_CODE (QUAL_WFL (qual)) == MODIFY_EXPR)
RESOLVE_EXPRESSION_NAME_P (qual_wfl) = 1;
/* Check here that NAME isn't declared by more than one