]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/ext/stdio_filebuf/char/10063-2.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / ext / stdio_filebuf / char / 10063-2.cc
index 9786d7090284df16e5fa01b2b69b040e306d6540..f8faf3276e6822ed03f2795ed69a27540f1bd619 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation
+// Copyright (C) 2000-2023 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
 // terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
+// Free Software Foundation; either version 3, or (at your option)
 // any later version.
 
 // This library is distributed in the hope that it will be useful,
 // GNU General Public License for more details.
 
 // You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// The ARM simulator does not provide support for "fstat", which
+// causes "sbumpc" to return an incorrect value.
+// { dg-do run { xfail arm*-*-elf arm*-*-eabi } }
+
+// { dg-require-fileio "" }
 
 #include <cstdio>
 #include <fstream>
@@ -24,7 +29,6 @@
 void test2()
 {
   using namespace std;
-  bool test __attribute__((unused)) = true;
 
   filebuf fbuf;
   fbuf.open("tmp_10063-2", ios_base::out | ios_base::trunc);
@@ -32,6 +36,7 @@ void test2()
   fbuf.close();
 
   FILE* file = fopen("tmp_10063-2", "r");
+  setbuf(file, 0);
   int c = getc(file);
   VERIFY(c == '0');
   c = getc(file);