I found the bug, to reproduce this bug, you can try the code below:
wxPathList pathArray;
pathArray.AddEnvList(_T("PATH")); // 1
pathArray.Add(_T("..\\dll")); // 2
wxPathList newPathArray;
newPathArray.Add(pathArray); //3
1, if you have "..\\xyz" like string in your PATH, those string will directly added to pathArray without any normalization.
2, wxWidgets will internally call "wxFileName::Normalize" in somewhere to expand the "..", so when this finished, you get a changed value, in my case, ".." was converted to "SomeParentPath", so you get something like "SomeParentPath\\dll" in the pathArray.
3, when running the step 3, wxWidgets will run "Normalize" on every piece of the pathArray, so there will be no ".." in the newPathArray.
Note: In the compiler plugin's source code, there is no such "step 2", so ,initially, the pathArray is OK, but it do have a "step 3", so finally, your ".." will be expanded.