]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/path.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 27_io / basic_filebuf / open / char / path.cc
index 56fffde5f9ba6b2314200cbc81c3c5260a18590e..0df22f2a47e9110af321b561a28451ed556d58aa 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Free Software Foundation, Inc.
+// Copyright (C) 2017-2024 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -15,7 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17 -lstdc++fs" }
+// { dg-options "-lstdc++fs" }
 // { dg-do run { target c++17 } }
 // { dg-require-fileio "" }
 // { dg-require-filesystem-ts "" }
@@ -24,7 +24,8 @@
 #include <filesystem>
 #include <testsuite_hooks.h>
 
-const std::filesystem::path filename = "filebuf_members-1.tst";
+char cstr[] = "filebuf_members-1.tst";
+const std::filesystem::path filename = cstr;
 
 void
 test01()
@@ -34,6 +35,13 @@ test01()
   VERIFY( fb.is_open() );
 }
 
+void
+test02() // compile-only
+{
+  std::filebuf fb;
+  fb.open(cstr, std::ios::in); // PR libstdc++/83025
+}
+
 int
 main()
 {