From: Jonathan Wakely Date: Wed, 26 Jul 2017 22:06:13 +0000 (+0100) Subject: PR libstdc++/53984 fix failing test X-Git-Tag: basepoints/gcc-9~5770 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=958dc0c2248fa83b12597d3be3e60fa483ec459b;p=thirdparty%2Fgcc.git PR libstdc++/53984 fix failing test PR libstdc++/53984 * testsuite/27_io/basic_fstream/53984.cc: Fix test. From-SVN: r250594 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index fab36e2ae226..c723b94875b7 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2017-07-26 Jonathan Wakely + + * testsuite/27_io/basic_fstream/53984.cc: Fix test. + 2017-07-26 Paolo Carlini * testsuite/27_io/basic_fstream/53984.cc: Fix typo in dg-require diff --git a/libstdc++-v3/testsuite/27_io/basic_fstream/53984.cc b/libstdc++-v3/testsuite/27_io/basic_fstream/53984.cc index 53c77c20f925..e49d2b1ad1f5 100644 --- a/libstdc++-v3/testsuite/27_io/basic_fstream/53984.cc +++ b/libstdc++-v3/testsuite/27_io/basic_fstream/53984.cc @@ -23,10 +23,13 @@ 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