[committed] libstdc++: test for failing assertion should use 'run' not 'compile'

Message ID 20200228184322.GA2666399@redhat.com
State New
Headers show
Series
  • [committed] libstdc++: test for failing assertion should use 'run' not 'compile'
Related show

Commit Message

Jonathan Wakely Feb. 28, 2020, 6:43 p.m.
And it only needs to define _GLIBCXX_ASSERTIONS not _GLIBCXX_DEBUG.

	* testsuite/24_iterators/range_operations/advance_debug_neg.cc: Run
	test instead of just compiling it.

Tested x86_64-linux, committed to master.
commit 4735f92d48c373031be296fd0f7a2cf31fc955da
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Feb 28 17:05:45 2020 +0000

    libstdc++: test for failing assertion should use 'run' not 'compile'
    
    And it only needs to define _GLIBCXX_ASSERTIONS not _GLIBCXX_DEBUG.
    
            * testsuite/24_iterators/range_operations/advance_debug_neg.cc: Run
            test instead of just compiling it.

Patch

diff --git a/libstdc++-v3/testsuite/24_iterators/range_operations/advance_debug_neg.cc b/libstdc++-v3/testsuite/24_iterators/range_operations/advance_debug_neg.cc
index ffda650fb0a..7a1ef97df14 100644
--- a/libstdc++-v3/testsuite/24_iterators/range_operations/advance_debug_neg.cc
+++ b/libstdc++-v3/testsuite/24_iterators/range_operations/advance_debug_neg.cc
@@ -15,8 +15,9 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a -D_GLIBCXX_DEBUG" }
-// { dg-do compile { xfail c++2a } }
+// { dg-options "-std=gnu++2a -D_GLIBCXX_ASSERTIONS" }
+// { dg-do run { xfail *-*-* } }
+// { dg-require-effective-target c++2a }
 
 #include <iterator>
 #include <testsuite_iterators.h>
@@ -29,3 +30,8 @@  test01()
   auto iter = c.begin();
   std::ranges::advance(iter, -1);
 }
+
+int main()
+{
+  test01();
+}