aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1997-01-04 06:34:23 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1997-01-04 06:34:23 -0500
commit7f11fbd56906b8ca871aca269dc6a71b9ef70c83 (patch)
treeafb2cf447abe7671cd16dcc179c566545dab4074 /gcc
parent095f66970e27a07c1c2e68aa87227627205956c8 (diff)
downloadgcc-7f11fbd56906b8ca871aca269dc6a71b9ef70c83.zip
gcc-7f11fbd56906b8ca871aca269dc6a71b9ef70c83.tar.gz
gcc-7f11fbd56906b8ca871aca269dc6a71b9ef70c83.tar.bz2
(vmskrunch): Try to not chop trailing uppercase letters.
From-SVN: r13363
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/alpha/alpha.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 718ad9b..3203eb8 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -1,5 +1,5 @@
/* Subroutines used for code generation on the DEC Alpha.
- Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
This file is part of GNU CC.
@@ -1924,11 +1924,14 @@ vmskrunch (name)
for (i = j; foo[i]==' ' && foo[i]; i++)
;
+ /* Find the first blank */
j = i;
if (foo[j])
for (i = j + 1; foo[i] != ' ' && foo[i]; i++)
;
+ /* If this substring is the longest so far, remember the
+ position of the character to chop off. */
slen = i - j;
if (slen > xlen)
{
@@ -1939,6 +1942,16 @@ vmskrunch (name)
j = i;
}
+ /* Try to avoid chopping uppercase suffix letters */
+ if (isupper (foo [chopchar]))
+ {
+ for (i = chopchar;
+ isupper (foo[i]) && foo[i] != ' ' && i >= 0;
+ i--)
+ ;
+ if (islower (foo[i]))
+ chopchar = i;
+ }
foo [chopchar] = ' ';
nlen--;
}