Message ID | 20201126112616.GA2103205@redhat.com |
---|---|
State | New |
Headers | show |
Series | [committed] libstdc++: Fix undefined FILE* operations in test | expand |
diff --git a/libstdc++-v3/testsuite/ext/stdio_filebuf/char/79820.cc b/libstdc++-v3/testsuite/ext/stdio_filebuf/char/79820.cc index c9842d6d03ed..aaa398c964a5 100644 --- a/libstdc++-v3/testsuite/ext/stdio_filebuf/char/79820.cc +++ b/libstdc++-v3/testsuite/ext/stdio_filebuf/char/79820.cc @@ -26,10 +26,11 @@ void test01() { FILE* f = std::fopen("79820.txt", "w"); - std::fclose(f); errno = 127; __gnu_cxx::stdio_filebuf<char> b(f, std::ios::out, BUFSIZ); VERIFY(errno == 127); // PR libstdc++/79820 + b.close(); + std::fclose(f); } int