re PR java/28474 (mangle_name.c mangles names unecessarily)
authorJoel Dice <dicej@mailsnare.net>
Tue, 20 Oct 2009 16:01:21 +0000 (16:01 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Tue, 20 Oct 2009 16:01:21 +0000 (16:01 +0000)
2009-10-20  Joel Dice <dicej@mailsnare.net>

        PR java/28474
        * mangle_name.c (append_unicode_mangled_name): Fix mangling
        of names with multiple underscores and "U".
        (unicode_mangling_length): Likewise.

From-SVN: r153021

gcc/java/ChangeLog
gcc/java/mangle_name.c

index 6ce9d58b0e03fd649c49112dd73713f68d8c316a..7815bc8a050805b778239c286281970329dea332 100644 (file)
@@ -1,3 +1,10 @@
+2009-10-20  Joel Dice <dicej@mailsnare.net>
+
+       PR java/28474
+       * mangle_name.c (append_unicode_mangled_name): Fix mangling
+       of names with multiple underscores and "U".
+       (unicode_mangling_length): Likewise.
+
 2009-10-03  Simon Baldwin  <simonb@google.com>
 
        * config-lang.in (lang_dirs): Remove zlib.
index a0e6887a04eb8f4d5c3bd5c204bc83e0a07774ef..a75f5cad0907fb49e2a2d5ec2162ebd9fafa38c2 100644 (file)
@@ -266,7 +266,10 @@ append_unicode_mangled_name (const char *name, int len)
       int ch = UTF8_GET(ptr, limit);
 
       if ((ISALNUM (ch) && ch != 'U') || ch == '$')
-       obstack_1grow (mangle_obstack, ch);
+        {
+         obstack_1grow (mangle_obstack, ch);
+          uuU = 0;
+        }
       /* Everything else needs encoding */
       else
        {
@@ -321,7 +324,10 @@ unicode_mangling_length (const char *name, int len)
       if (ch < 0)
        error ("internal error - invalid Utf8 name");
       if ((ISALNUM (ch) && ch != 'U') || ch == '$')
-       num_chars++;
+       {
+         num_chars++;
+         uuU = 0;
+       }
       /* Everything else needs encoding */
       else
        {