PR libstdc++/53984 fix failing test
authorJonathan Wakely <jwakely@redhat.com>
Wed, 26 Jul 2017 22:06:13 +0000 (23:06 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 26 Jul 2017 22:06:13 +0000 (23:06 +0100)
PR libstdc++/53984
* testsuite/27_io/basic_fstream/53984.cc: Fix test.

From-SVN: r250594

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/27_io/basic_fstream/53984.cc

index fab36e2ae226999abdea10bcc9c65dd8dce69ebe..c723b94875b7d1f266826d6472260ae2a9e174a7 100644 (file)
@@ -1,3 +1,7 @@
+2017-07-26  Jonathan Wakely  <jwakely@redhat.com>
+
+       * testsuite/27_io/basic_fstream/53984.cc: Fix test.
+
 2017-07-26  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * testsuite/27_io/basic_fstream/53984.cc: Fix typo in dg-require
index 53c77c20f9256e5cbc1b343feec0a177915f4f98..e49d2b1ad1f5f4d39c31128e0ec750f5912be48a 100644 (file)
 void
 test01()
 {
-  std::fstream in(".");
-  int x;
-  in >> x;
-  VERIFY( in.bad() );
+  std::ifstream in(".");
+  if (in)
+  {
+    int x;
+    in >> x;
+    VERIFY( in.bad() );
+  }
 }
 
 int