summaryrefslogtreecommitdiffstats
path: root/gcc/java/typeck.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java/typeck.c')
-rw-r--r--gcc/java/typeck.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/java/typeck.c b/gcc/java/typeck.c
index 331de1c9fb6..213a3899fbc 100644
--- a/gcc/java/typeck.c
+++ b/gcc/java/typeck.c
@@ -755,7 +755,10 @@ lookup_java_method (searched_class, method_name, method_signature)
method != NULL_TREE; method = TREE_CHAIN (method))
{
tree method_sig = build_java_signature (TREE_TYPE (method));
- if (DECL_NAME (method) == method_name
+ tree name = DECL_NAME (method);
+
+ if ((TREE_CODE (name) == EXPR_WITH_FILE_LOCATION ?
+ EXPR_WFL_NODE (name) : name) == method_name
&& method_sig == method_signature)
return method;
}
@@ -788,8 +791,10 @@ lookup_java_method (searched_class, method_name, method_signature)
method != NULL_TREE; method = TREE_CHAIN (method))
{
tree method_sig = build_java_signature (TREE_TYPE (method));
+ tree name = DECL_NAME (method);
- if (DECL_NAME (method) == method_name
+ if ((TREE_CODE (name) == EXPR_WITH_FILE_LOCATION ?
+ EXPR_WFL_NODE (name) : name) == method_name
&& method_sig == method_signature)
return method;
}
OpenPOWER on IntegriCloud