diff mbox series

Fix test 86658 in Debug mode

Message ID fb518547-c4ca-3d23-deb1-1368b8112b36@gmail.com
State New
Headers show
Series Fix test 86658 in Debug mode | expand

Commit Message

François Dumont Aug. 18, 2018, 8:09 p.m. UTC
This test fails when using 'make check-debug' because it redefines 
_GLIBCXX_DEBUG. Using dg-options fixes this problem.

Committed as trivial.

François

Comments

Jonathan Wakely Aug. 20, 2018, 8:25 a.m. UTC | #1
On 18/08/18 22:09 +0200, François Dumont wrote:
>This test fails when using 'make check-debug' because it redefines 
>_GLIBCXX_DEBUG. Using dg-options fixes this problem.

Changing it to "#define _GLIBCXX_DEBUG 1" would also have fixed it,
because that would be the same value as -D_GLIBCXX_DEBUG sets, and a
redefinition to the same value doesn't warn.

Using dg-options is cleaner though, thanks.
diff mbox series

Patch

diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/86658.cc b/libstdc++-v3/testsuite/25_algorithms/copy/86658.cc
index 600747a..dd4f7ba 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy/86658.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/86658.cc
@@ -15,9 +15,9 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
+// { dg-options "-D_GLIBCXX_DEBUG" }
 // { dg-do run }
 
-#define _GLIBCXX_DEBUG
 #include <algorithm>
 #include <vector>