https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115189
--- Comment #3 from Tomas Kalibera <tomas.kalibera at gmail dot com> --- I hope there is a more elegant solution, but I could think of a best-effort one. Check if the result of the normalization is a UNC path, if yes, check if the original path started with a drive letter, if yes, modify the UNC path replacing the \\server\share by that drive, normalize the modified path again and if it normalizes to the same UNC path, use the version with the drive; otherwise, use the original UNC result of normalization.