summaryrefslogtreecommitdiffstats
path: root/gcc/java/mangle.c
diff options
context:
space:
mode:
authorbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-30 04:43:16 +0000
committerbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-30 04:43:16 +0000
commit7c5ab81c6bfa87fe32f5f61fc1931ba1f113299b (patch)
treec355fc11b95d68ec05bdce4b447b1e821db110fc /gcc/java/mangle.c
parent1c32e99d536fedf3769c026ed87ce50541b8a8a0 (diff)
downloadppe42-gcc-7c5ab81c6bfa87fe32f5f61fc1931ba1f113299b.tar.gz
ppe42-gcc-7c5ab81c6bfa87fe32f5f61fc1931ba1f113299b.zip
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46628 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/mangle.c')
-rw-r--r--gcc/java/mangle.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/java/mangle.c b/gcc/java/mangle.c
index f0bda0eaa77..aa95086fc2a 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)
OpenPOWER on IntegriCloud