diff options
Diffstat (limited to 'gcc/xcoffout.c')
-rw-r--r-- | gcc/xcoffout.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/gcc/xcoffout.c b/gcc/xcoffout.c index bf8775b762a..14ebce8e259 100644 --- a/gcc/xcoffout.c +++ b/gcc/xcoffout.c @@ -462,16 +462,19 @@ xcoffout_declare_function (file, decl, name) char *n = name; int i; - for (i = 0; name[i]; ++i) - { - if (name[i] == '[') - { - n = (char *) alloca (i + 1); - strncpy (n, name, i); - n[i] = '\0'; - break; - } - } + if (*n == '*') + n++; + else + for (i = 0; name[i]; ++i) + { + if (name[i] == '[') + { + n = (char *) alloca (i + 1); + strncpy (n, name, i); + n[i] = '\0'; + break; + } + } /* Any pending .bi or .ei must occur before the .function pseudo op. Otherwise debuggers will think that the function is in the previous |