]> gcc.gnu.org Git - gcc.git/commitdiff
re PR java/4717 (miscompiling class reference)
authorBryce McKinlay <bryce@waitaki.otago.ac.nz>
Tue, 30 Oct 2001 04:43:16 +0000 (04:43 +0000)
committerBryce McKinlay <bryce@gcc.gnu.org>
Tue, 30 Oct 2001 04:43:16 +0000 (04:43 +0000)
       * 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

gcc/java/ChangeLog
gcc/java/mangle.c

index 7b6b4efa5f28c5e83c301b496f14d2faaa3ce64f..5049cfd5833153954fd8b9952a3039a37207a55c 100644 (file)
@@ -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
index f0bda0eaa77b50a9fd0aff4585ff35b60444f6ba..aa95086fc2af097d53604a62a5b51b21099f227e 100644 (file)
@@ -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)
This page took 0.112305 seconds and 5 git commands to generate.