diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 33490f60285..fb576cb4c97 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -3884,10 +3884,11 @@ d_clone_suffix (struct d_info *di, struct demangle_component *encoding) const char *pend = suffix; struct demangle_component *n; - if (*pend == '.' && (IS_LOWER (pend[1]) || pend[1] == '_')) + if (*pend == '.' && (IS_LOWER (pend[1]) || IS_DIGIT (pend[1]) + || pend[1] == '_')) { pend += 2; - while (IS_LOWER (*pend) || *pend == '_') + while (IS_LOWER (*pend) || IS_DIGIT (*pend) || *pend == '_') ++pend; } while (*pend == '.' && IS_DIGIT (pend[1])) diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected index 19a0d621bc0..de54ad73cc8 100644 --- a/libiberty/testsuite/demangle-expected +++ b/libiberty/testsuite/demangle-expected @@ -1164,6 +1164,11 @@ foo(int) [clone ._omp_cpyfn.6] foo # --format=gnu-v3 --no-params +_Z3fooPfS_S_j.sse4_1.2 +foo(float*, float*, float*, unsigned int) [clone .sse4_1.2] +foo +# +--format=gnu-v3 --no-params _Z1fIKFvvES0_Evv void f() f