diff --git a/gcc/collect2.c b/gcc/collect2.c index 87ae569a25b..52a04455f10 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -2181,7 +2181,7 @@ locatelib (name) if (*q == ':') { *q++ = 0; - *pp++ = p; + *pp++ = q; } } /* built in directories are /lib, /usr/lib, and /usr/local/lib */