aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorBryce McKinlay <bryce@waitaki.otago.ac.nz>2001-10-30 04:43:16 +0000
committerBryce McKinlay <bryce@gcc.gnu.org>2001-10-30 04:43:16 +0000
commit2b472f91ee2e77f6b457d7880c13ed627e9b8666 (patch)
treec355fc11b95d68ec05bdce4b447b1e821db110fc /gcc/java
parent79e2e1605ed490d653541cecbc9da3671a895b90 (diff)
downloadgcc-2b472f91ee2e77f6b457d7880c13ed627e9b8666.zip
gcc-2b472f91ee2e77f6b457d7880c13ed627e9b8666.tar.gz
gcc-2b472f91ee2e77f6b457d7880c13ed627e9b8666.tar.bz2
re PR java/4717 (miscompiling class reference)
* mangle.c (find_compression_record_match): Don't match compression records for package name elements unless they occur at the start of the name. Fix for PR java/4717. From-SVN: r46628
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog6
-rw-r--r--gcc/java/mangle.c12
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 7b6b4ef..5049cfd 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,9 @@
+2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
+
+ * mangle.c (find_compression_record_match): Don't match compression
+ records for package name elements unless they occur at the start of
+ the name. Fix for PR java/4717.
+
2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* expr.c (expand_java_field_op): Don't special-case references to
diff --git a/gcc/java/mangle.c b/gcc/java/mangle.c
index f0bda0e..aa95086 100644
--- a/gcc/java/mangle.c
+++ b/gcc/java/mangle.c
@@ -327,8 +327,20 @@ find_compression_record_match (type, next_current)
{
match = i = j;
saved_current = current;
+ i++;
break;
}
+ else
+ {
+ /* We don't want to match an element that appears in the middle
+ of a package name, so skip forward to the next complete type name.
+ IDENTIFIER_NODEs are partial package names while RECORD_TYPEs
+ represent complete type names. */
+ while (j < compression_next
+ && TREE_CODE (TREE_VEC_ELT (compression_table, j)) ==
+ IDENTIFIER_NODE)
+ j++;
+ }
}
if (!next_current)