For
clang -c -g -fdebug-prefix-map=a/b=y -fdebug-prefix-map=a=x a/b/c.c,
we apply the longest prefix substitution, but
GCC has always been picking the last applicable option (a=x, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109591).
I feel that GCC's behavior is reasonable given the convention that the last
value wins for the same option.
Before D49466, Clang appeared to apply the shortest prefix substitution,
which likely made the least sense.
What benefit does forcing allocation have? Why not use the default, or switch to std::vector?