public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/113589] New: FAIL: experimental/filesystem/operations/absolute.cc on Windows
@ 2024-01-24 23:44 nightstrike at gmail dot com
2024-01-24 23:53 ` [Bug libstdc++/113589] " pinskia at gcc dot gnu.org
2024-01-24 23:56 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: nightstrike at gmail dot com @ 2024-01-24 23:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113589
Bug ID: 113589
Summary: FAIL: experimental/filesystem/operations/absolute.cc
on Windows
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: nightstrike at gmail dot com
Target Milestone: ---
(Probably related to PR88884)
The absolute.cc test fails this assertion:
VERIFY( absolute(p).is_absolute() );
on the second path in __gnu_test::test_paths, I think because
absolute(p).has_root_name() returns false:
```
std::cout << absolute(p) << std::endl;
std::cout << "has: " << absolute(p).has_root_name() << " " <<
absolute(p).has_root_directory() << std::endl;
VERIFY( absolute(p).is_absolute() );
```
```
spawn wine64 ./absolute.exe^M
"H:/"^M^M
has: 1 1^M^M
"//\\home\\user\\p\\gcc\\src\\gcc-git\\_w\\x86_64-w64-mingw32\\libstdc++-v3\\testsuite"^M^M
has: 0 1^M^M
```
So H:/ works, but //\\path doesn't. I guess all these extra slashes are due to
running under wine, but presumably real applications may do so.
absolute() does the following:
```
if (p.has_root_directory()) // implies !p.has_root_name()
{
// GetFullPathNameW("//") gives unwanted result (PR 88884).
// If there are multiple directory separators at the start,
// skip all but the last of them.
const auto pos = s.find_first_not_of(L"/\\");
__glibcxx_assert(pos != 0);
s.remove_prefix(std::min(s.length(), pos) - 1);
}
```
So I guess this needs to be a little bit smarter to handle Wine paths maybe?
Sorry I couldn't take this further, but I'll be happy to test a fix.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libstdc++/113589] FAIL: experimental/filesystem/operations/absolute.cc on Windows
2024-01-24 23:44 [Bug libstdc++/113589] New: FAIL: experimental/filesystem/operations/absolute.cc on Windows nightstrike at gmail dot com
@ 2024-01-24 23:53 ` pinskia at gcc dot gnu.org
2024-01-24 23:56 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-24 23:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113589
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I actually think this is a dup of bug 106127.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libstdc++/113589] FAIL: experimental/filesystem/operations/absolute.cc on Windows
2024-01-24 23:44 [Bug libstdc++/113589] New: FAIL: experimental/filesystem/operations/absolute.cc on Windows nightstrike at gmail dot com
2024-01-24 23:53 ` [Bug libstdc++/113589] " pinskia at gcc dot gnu.org
@ 2024-01-24 23:56 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-24 23:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113589
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Oh yes it is a dup:
> It causes experimental/filesystem/operations/absolute.cc to FAIL on Windows
*** This bug has been marked as a duplicate of bug 106127 ***
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-01-24 23:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-24 23:44 [Bug libstdc++/113589] New: FAIL: experimental/filesystem/operations/absolute.cc on Windows nightstrike at gmail dot com
2024-01-24 23:53 ` [Bug libstdc++/113589] " pinskia at gcc dot gnu.org
2024-01-24 23:56 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).