* Make tests failing with version namespace UNSUPPORTED
@ 2017-09-27 20:40 François Dumont
2017-10-23 20:09 ` François Dumont
0 siblings, 1 reply; 3+ messages in thread
From: François Dumont @ 2017-09-27 20:40 UTC (permalink / raw)
To: libstdc++, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 1727 bytes --]
Hi
   I would like to propose to add a new dg-require-normal-namespace
attribute to make several tests failing when version namespace is active
UNSUPPORTED. It is like dg-require-normal-mode but also consider when
version namespace is being used.
   I still need to complete execution of all tests with version
namespace but I think that all tests will be ok then.
   I have also updated the code used for dg-require-normal-mode to
include c++config.h in case users are changing this file to activate any
mode.
   * testsuite/lib/libstdc++.exp ([check_v3_target_normal_namespace]):
New.
   * testsuite/lib/dg-options.exp ([dg-require-normal-namespace]): New,
   use latter.
   * testsuite/23_containers/headers/bitset/synopsis.cc: Replace
   dg-require-normal-mode with latter.
   * testsuite/23_containers/headers/deque/synopsis.cc: Likewise.
   * testsuite/23_containers/headers/forward_list/synopsis.cc: Likewise.
   * testsuite/23_containers/headers/list/synopsis.cc: Likewise.
   * testsuite/23_containers/headers/map/synopsis.cc: Likewise.
   * testsuite/23_containers/headers/set/synopsis.cc: Likewise.
   * testsuite/23_containers/headers/vector/synopsis.cc: Likewise.
   * testsuite/23_containers/map/modifiers/erase/abi_tag.cc: Likewise.
   * testsuite/23_containers/multimap/modifiers/erase/abi_tag.cc:
Likewise.
   * testsuite/23_containers/multiset/modifiers/erase/abi_tag.cc:
Likewise.
   * testsuite/23_containers/set/modifiers/erase/abi_tag.cc: Likewise.
   Ok to commit ?
François
[-- Attachment #2: dg-require-normal-namespace.patch --]
[-- Type: text/x-patch, Size: 8930 bytes --]
diff --git a/libstdc++-v3/testsuite/23_containers/headers/bitset/synopsis.cc b/libstdc++-v3/testsuite/23_containers/headers/bitset/synopsis.cc
index 6ef085a..8b3967c 100644
--- a/libstdc++-v3/testsuite/23_containers/headers/bitset/synopsis.cc
+++ b/libstdc++-v3/testsuite/23_containers/headers/bitset/synopsis.cc
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-require-normal-mode "" }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/23_containers/headers/deque/synopsis.cc b/libstdc++-v3/testsuite/23_containers/headers/deque/synopsis.cc
index aa2b787..0de29c2 100644
--- a/libstdc++-v3/testsuite/23_containers/headers/deque/synopsis.cc
+++ b/libstdc++-v3/testsuite/23_containers/headers/deque/synopsis.cc
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-require-normal-mode "" }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/23_containers/headers/forward_list/synopsis.cc b/libstdc++-v3/testsuite/23_containers/headers/forward_list/synopsis.cc
index b1792ce..21e79c4 100644
--- a/libstdc++-v3/testsuite/23_containers/headers/forward_list/synopsis.cc
+++ b/libstdc++-v3/testsuite/23_containers/headers/forward_list/synopsis.cc
@@ -1,5 +1,5 @@
// { dg-do compile { target c++11 } }
-// { dg-require-normal-mode "" }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2008-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/23_containers/headers/list/synopsis.cc b/libstdc++-v3/testsuite/23_containers/headers/list/synopsis.cc
index ab22b9f..e8c61aa 100644
--- a/libstdc++-v3/testsuite/23_containers/headers/list/synopsis.cc
+++ b/libstdc++-v3/testsuite/23_containers/headers/list/synopsis.cc
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-require-normal-mode "" }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/23_containers/headers/map/synopsis.cc b/libstdc++-v3/testsuite/23_containers/headers/map/synopsis.cc
index f4a0826..d74fca1 100644
--- a/libstdc++-v3/testsuite/23_containers/headers/map/synopsis.cc
+++ b/libstdc++-v3/testsuite/23_containers/headers/map/synopsis.cc
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-require-normal-mode "" }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/23_containers/headers/set/synopsis.cc b/libstdc++-v3/testsuite/23_containers/headers/set/synopsis.cc
index e50a044..58e94bc 100644
--- a/libstdc++-v3/testsuite/23_containers/headers/set/synopsis.cc
+++ b/libstdc++-v3/testsuite/23_containers/headers/set/synopsis.cc
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-require-normal-mode "" }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/23_containers/headers/vector/synopsis.cc b/libstdc++-v3/testsuite/23_containers/headers/vector/synopsis.cc
index c127b5d..47cbe16 100644
--- a/libstdc++-v3/testsuite/23_containers/headers/vector/synopsis.cc
+++ b/libstdc++-v3/testsuite/23_containers/headers/vector/synopsis.cc
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-require-normal-mode "" }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/23_containers/map/modifiers/erase/abi_tag.cc b/libstdc++-v3/testsuite/23_containers/map/modifiers/erase/abi_tag.cc
index deec016..acf06b1 100644
--- a/libstdc++-v3/testsuite/23_containers/map/modifiers/erase/abi_tag.cc
+++ b/libstdc++-v3/testsuite/23_containers/map/modifiers/erase/abi_tag.cc
@@ -1,5 +1,5 @@
// { dg-do compile { target c++11 } }
-// { dg-require-normal-mode "" }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2013-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/abi_tag.cc b/libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/abi_tag.cc
index a2152e2..f511a77 100644
--- a/libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/abi_tag.cc
+++ b/libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/abi_tag.cc
@@ -1,5 +1,5 @@
// { dg-do compile { target c++11 } }
-// { dg-require-normal-mode "" }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2013-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/abi_tag.cc b/libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/abi_tag.cc
index a7b1584..ef2bd2c 100644
--- a/libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/abi_tag.cc
+++ b/libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/abi_tag.cc
@@ -1,5 +1,5 @@
// { dg-do compile { target c++11 } }
-// { dg-require-normal-mode "" }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2013-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/23_containers/set/modifiers/erase/abi_tag.cc b/libstdc++-v3/testsuite/23_containers/set/modifiers/erase/abi_tag.cc
index f3ecc14..9fa3f1bc 100644
--- a/libstdc++-v3/testsuite/23_containers/set/modifiers/erase/abi_tag.cc
+++ b/libstdc++-v3/testsuite/23_containers/set/modifiers/erase/abi_tag.cc
@@ -1,5 +1,5 @@
// { dg-do compile { target c++11 } }
-// { dg-require-normal-mode "" }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2013-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/lib/dg-options.exp b/libstdc++-v3/testsuite/lib/dg-options.exp
index a276001..4de6bcc 100644
--- a/libstdc++-v3/testsuite/lib/dg-options.exp
+++ b/libstdc++-v3/testsuite/lib/dg-options.exp
@@ -61,6 +61,15 @@ proc dg-require-normal-mode { args } {
return
}
+proc dg-require-normal-namespace { args } {
+ if { ![ check_v3_target_normal_namespace ] } {
+ upvar dg-do-what dg-do-what
+ set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
+ return
+ }
+ return
+}
+
proc dg-require-parallel-mode { args } {
if { ![ check_v3_target_parallel_mode ] } {
upvar dg-do-what dg-do-what
diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index d530403..659964a 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -1114,7 +1114,7 @@ proc check_v3_target_versionnamespace_mode { } {
proc check_v3_target_normal_mode { } {
global et_normal_mode
- global tool
+ global tool
if { ![info exists et_normal_mode_target_name] } {
set et_normal_mode_target_name ""
@@ -1141,7 +1141,10 @@ proc check_v3_target_normal_mode { } {
set src normal_mode[pid].cc
set f [open $src "w"]
- puts $f "#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PROFILE) || defined(_GLIBCXX_PARALLEL)"
+ puts $f "#include <bits/c++config.h>"
+ puts $f "#if defined(_GLIBCXX_DEBUG) || \\"
+ puts $f " defined(_GLIBCXX_PROFILE) || \\"
+ puts $f " defined(_GLIBCXX_PARALLEL)"
puts $f "# error No normal mode"
puts $f "#endif"
close $f
@@ -1158,6 +1161,56 @@ proc check_v3_target_normal_mode { } {
return $et_normal_mode
}
+proc check_v3_target_normal_namespace { } {
+ global et_normal_namespace
+ global tool
+
+ if { ![info exists et_normal_namespace_target_name] } {
+ set et_normal_namespace_target_name ""
+ }
+
+ # If the target has changed since we set the cached value, clear it.
+ set current_target [current_target_name]
+ if { $current_target != $et_normal_namespace_target_name } {
+ verbose "check_v3_target_normal_namespace: `$et_normal_namespace_target_name'" 2
+ set et_normal_namespace_target_name $current_target
+ if [info exists et_normal_namespace] {
+ verbose "check_v3_target_normal_namespace: removing cached result" 2
+ unset et_normal_namespace
+ }
+ }
+
+ if [info exists et_normal_namespace] {
+ verbose "check_v3_target_normal_namespace: using cached result" 2
+ } else {
+ set et_normal_namespace 0
+
+ # Set up and compile a C++ test program that depends
+ # on normal std namespace.
+ set src normal_namespace[pid].cc
+
+ set f [open $src "w"]
+ puts $f "#include <bits/c++config.h>"
+ puts $f "#if defined(_GLIBCXX_DEBUG) || \\"
+ puts $f " defined(_GLIBCXX_PROFILE) || \\"
+ puts $f " defined(_GLIBCXX_PARALLEL) || \\"
+ puts $f " _GLIBCXX_INLINE_VERSION"
+ puts $f "# error No normal namespace"
+ puts $f "#endif"
+ close $f
+
+ set lines [v3_target_compile $src /dev/null preprocess ""]
+ file delete $src
+
+ if [string match "" $lines] {
+ # No error message, compilation succeeded.
+ set et_normal_namespace 1
+ }
+ }
+ verbose "check_v3_target_normal_namespace: $et_normal_namespace" 2
+ return $et_normal_namespace
+}
+
proc check_v3_target_parallel_mode { } {
global cxxflags
global v3-libgomp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Make tests failing with version namespace UNSUPPORTED
2017-09-27 20:40 Make tests failing with version namespace UNSUPPORTED François Dumont
@ 2017-10-23 20:09 ` François Dumont
2017-10-23 22:19 ` Jonathan Wakely
0 siblings, 1 reply; 3+ messages in thread
From: François Dumont @ 2017-10-23 20:09 UTC (permalink / raw)
To: libstdc++, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 2258 bytes --]
Hi
   I completed execution of all tests and added the
dg-require-normal-namespace to a few more files.
   I also eventually prefer to keep dg-require-normal-mode and
dg-require-normal-namespace seperated, the first for alternative modes,
the latter for versioned namespace.
   With this patch there is no more conformance tests failing with
versioned namespace.
Ok to commit ?
François
On 27/09/2017 22:40, François Dumont wrote:
> Hi
>
> Â Â Â I would like to propose to add a new dg-require-normal-namespace
> attribute to make several tests failing when version namespace is
> active UNSUPPORTED. It is like dg-require-normal-mode but also
> consider when version namespace is being used.
>
> Â Â Â I still need to complete execution of all tests with version
> namespace but I think that all tests will be ok then.
>
> Â Â Â I have also updated the code used for dg-require-normal-mode to
> include c++config.h in case users are changing this file to activate
> any mode.
>
> Â Â Â * testsuite/lib/libstdc++.exp
> ([check_v3_target_normal_namespace]): New.
> Â Â Â * testsuite/lib/dg-options.exp ([dg-require-normal-namespace]): New,
> Â Â Â use latter.
> Â Â Â * testsuite/23_containers/headers/bitset/synopsis.cc: Replace
> Â Â Â dg-require-normal-mode with latter.
> Â Â Â * testsuite/23_containers/headers/deque/synopsis.cc: Likewise.
> Â Â Â * testsuite/23_containers/headers/forward_list/synopsis.cc: Likewise.
> Â Â Â * testsuite/23_containers/headers/list/synopsis.cc: Likewise.
> Â Â Â * testsuite/23_containers/headers/map/synopsis.cc: Likewise.
> Â Â Â * testsuite/23_containers/headers/set/synopsis.cc: Likewise.
> Â Â Â * testsuite/23_containers/headers/vector/synopsis.cc: Likewise.
> Â Â Â * testsuite/23_containers/map/modifiers/erase/abi_tag.cc: Likewise.
> Â Â Â * testsuite/23_containers/multimap/modifiers/erase/abi_tag.cc:
> Likewise.
> Â Â Â * testsuite/23_containers/multiset/modifiers/erase/abi_tag.cc:
> Likewise.
> Â Â Â * testsuite/23_containers/set/modifiers/erase/abi_tag.cc: Likewise.
>
> Â Â Â Ok to commit ?
>
> François
>
>
[-- Attachment #2: dg-require-normal-namespace.patch --]
[-- Type: text/x-patch, Size: 18899 bytes --]
diff --git a/libstdc++-v3/testsuite/18_support/headers/limits/synopsis.cc b/libstdc++-v3/testsuite/18_support/headers/limits/synopsis.cc
index e298374..91fdf37 100644
--- a/libstdc++-v3/testsuite/18_support/headers/limits/synopsis.cc
+++ b/libstdc++-v3/testsuite/18_support/headers/limits/synopsis.cc
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/20_util/from_chars/requirements.cc b/libstdc++-v3/testsuite/20_util/from_chars/requirements.cc
index 00b7d87..6afc918 100644
--- a/libstdc++-v3/testsuite/20_util/from_chars/requirements.cc
+++ b/libstdc++-v3/testsuite/20_util/from_chars/requirements.cc
@@ -17,6 +17,7 @@
// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
+// { dg-require-normal-namespace "" }
#include <charconv>
diff --git a/libstdc++-v3/testsuite/20_util/headers/functional/synopsis.cc b/libstdc++-v3/testsuite/20_util/headers/functional/synopsis.cc
index 466d3d4..c001daa 100644
--- a/libstdc++-v3/testsuite/20_util/headers/functional/synopsis.cc
+++ b/libstdc++-v3/testsuite/20_util/headers/functional/synopsis.cc
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/20_util/headers/memory/synopsis.cc b/libstdc++-v3/testsuite/20_util/headers/memory/synopsis.cc
index adf5f48..95f42ac 100644
--- a/libstdc++-v3/testsuite/20_util/headers/memory/synopsis.cc
+++ b/libstdc++-v3/testsuite/20_util/headers/memory/synopsis.cc
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/20_util/headers/utility/synopsis.cc b/libstdc++-v3/testsuite/20_util/headers/utility/synopsis.cc
index 71f1903..95308139 100644
--- a/libstdc++-v3/testsuite/20_util/headers/utility/synopsis.cc
+++ b/libstdc++-v3/testsuite/20_util/headers/utility/synopsis.cc
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/20_util/to_chars/requirements.cc b/libstdc++-v3/testsuite/20_util/to_chars/requirements.cc
index d50588b..4c13d8a 100644
--- a/libstdc++-v3/testsuite/20_util/to_chars/requirements.cc
+++ b/libstdc++-v3/testsuite/20_util/to_chars/requirements.cc
@@ -17,6 +17,7 @@
// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
+// { dg-require-normal-namespace "" }
#include <charconv>
diff --git a/libstdc++-v3/testsuite/21_strings/headers/string/synopsis.cc b/libstdc++-v3/testsuite/21_strings/headers/string/synopsis.cc
index d27d220..568d846 100644
--- a/libstdc++-v3/testsuite/21_strings/headers/string/synopsis.cc
+++ b/libstdc++-v3/testsuite/21_strings/headers/string/synopsis.cc
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/22_locale/headers/locale/synopsis.cc b/libstdc++-v3/testsuite/22_locale/headers/locale/synopsis.cc
index 7204fd4..236d2e3 100644
--- a/libstdc++-v3/testsuite/22_locale/headers/locale/synopsis.cc
+++ b/libstdc++-v3/testsuite/22_locale/headers/locale/synopsis.cc
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/23_containers/headers/bitset/synopsis.cc b/libstdc++-v3/testsuite/23_containers/headers/bitset/synopsis.cc
index 6ef085a..8f07ce2 100644
--- a/libstdc++-v3/testsuite/23_containers/headers/bitset/synopsis.cc
+++ b/libstdc++-v3/testsuite/23_containers/headers/bitset/synopsis.cc
@@ -1,5 +1,6 @@
// { dg-do compile }
// { dg-require-normal-mode "" }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/23_containers/headers/deque/synopsis.cc b/libstdc++-v3/testsuite/23_containers/headers/deque/synopsis.cc
index aa2b787..76f10a5 100644
--- a/libstdc++-v3/testsuite/23_containers/headers/deque/synopsis.cc
+++ b/libstdc++-v3/testsuite/23_containers/headers/deque/synopsis.cc
@@ -1,5 +1,6 @@
// { dg-do compile }
// { dg-require-normal-mode "" }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/23_containers/headers/forward_list/synopsis.cc b/libstdc++-v3/testsuite/23_containers/headers/forward_list/synopsis.cc
index b1792ce..c9f1df5 100644
--- a/libstdc++-v3/testsuite/23_containers/headers/forward_list/synopsis.cc
+++ b/libstdc++-v3/testsuite/23_containers/headers/forward_list/synopsis.cc
@@ -1,5 +1,6 @@
// { dg-do compile { target c++11 } }
// { dg-require-normal-mode "" }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2008-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/23_containers/headers/list/synopsis.cc b/libstdc++-v3/testsuite/23_containers/headers/list/synopsis.cc
index ab22b9f..bcc0376 100644
--- a/libstdc++-v3/testsuite/23_containers/headers/list/synopsis.cc
+++ b/libstdc++-v3/testsuite/23_containers/headers/list/synopsis.cc
@@ -1,5 +1,6 @@
// { dg-do compile }
// { dg-require-normal-mode "" }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/23_containers/headers/map/synopsis.cc b/libstdc++-v3/testsuite/23_containers/headers/map/synopsis.cc
index f4a0826..8d43335 100644
--- a/libstdc++-v3/testsuite/23_containers/headers/map/synopsis.cc
+++ b/libstdc++-v3/testsuite/23_containers/headers/map/synopsis.cc
@@ -1,5 +1,6 @@
// { dg-do compile }
// { dg-require-normal-mode "" }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/23_containers/headers/queue/synopsis.cc b/libstdc++-v3/testsuite/23_containers/headers/queue/synopsis.cc
index f03d577..8c549b3 100644
--- a/libstdc++-v3/testsuite/23_containers/headers/queue/synopsis.cc
+++ b/libstdc++-v3/testsuite/23_containers/headers/queue/synopsis.cc
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/23_containers/headers/set/synopsis.cc b/libstdc++-v3/testsuite/23_containers/headers/set/synopsis.cc
index e50a044..9a8df57 100644
--- a/libstdc++-v3/testsuite/23_containers/headers/set/synopsis.cc
+++ b/libstdc++-v3/testsuite/23_containers/headers/set/synopsis.cc
@@ -1,5 +1,6 @@
// { dg-do compile }
// { dg-require-normal-mode "" }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/23_containers/headers/stack/synopsis.cc b/libstdc++-v3/testsuite/23_containers/headers/stack/synopsis.cc
index f1bac94..aff07dc 100644
--- a/libstdc++-v3/testsuite/23_containers/headers/stack/synopsis.cc
+++ b/libstdc++-v3/testsuite/23_containers/headers/stack/synopsis.cc
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/23_containers/headers/vector/synopsis.cc b/libstdc++-v3/testsuite/23_containers/headers/vector/synopsis.cc
index c127b5d..12a7197 100644
--- a/libstdc++-v3/testsuite/23_containers/headers/vector/synopsis.cc
+++ b/libstdc++-v3/testsuite/23_containers/headers/vector/synopsis.cc
@@ -1,5 +1,6 @@
// { dg-do compile }
// { dg-require-normal-mode "" }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/23_containers/map/modifiers/erase/abi_tag.cc b/libstdc++-v3/testsuite/23_containers/map/modifiers/erase/abi_tag.cc
index deec016..13e5717 100644
--- a/libstdc++-v3/testsuite/23_containers/map/modifiers/erase/abi_tag.cc
+++ b/libstdc++-v3/testsuite/23_containers/map/modifiers/erase/abi_tag.cc
@@ -1,5 +1,6 @@
// { dg-do compile { target c++11 } }
// { dg-require-normal-mode "" }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2013-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/abi_tag.cc b/libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/abi_tag.cc
index a2152e2..2303623 100644
--- a/libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/abi_tag.cc
+++ b/libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/abi_tag.cc
@@ -1,5 +1,6 @@
// { dg-do compile { target c++11 } }
// { dg-require-normal-mode "" }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2013-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/abi_tag.cc b/libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/abi_tag.cc
index a7b1584..92e91c1 100644
--- a/libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/abi_tag.cc
+++ b/libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/abi_tag.cc
@@ -1,5 +1,6 @@
// { dg-do compile { target c++11 } }
// { dg-require-normal-mode "" }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2013-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/23_containers/set/modifiers/erase/abi_tag.cc b/libstdc++-v3/testsuite/23_containers/set/modifiers/erase/abi_tag.cc
index f3ecc14..7d785e6 100644
--- a/libstdc++-v3/testsuite/23_containers/set/modifiers/erase/abi_tag.cc
+++ b/libstdc++-v3/testsuite/23_containers/set/modifiers/erase/abi_tag.cc
@@ -1,5 +1,6 @@
// { dg-do compile { target c++11 } }
// { dg-require-normal-mode "" }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2013-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis.cc b/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis.cc
index 64659c5..58b731a 100644
--- a/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis.cc
+++ b/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis.cc
@@ -1,5 +1,6 @@
// { dg-options "-std=gnu++98" }
// { dg-do compile }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++11.cc b/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++11.cc
index ae3c265..87f1488 100644
--- a/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++11.cc
+++ b/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++11.cc
@@ -1,5 +1,6 @@
// { dg-options "-std=gnu++11" }
// { dg-do compile }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2016-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++14.cc b/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++14.cc
index de7ae1f..7370a52 100644
--- a/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++14.cc
+++ b/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++14.cc
@@ -1,5 +1,6 @@
// { dg-options "-std=gnu++14" }
// { dg-do compile }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2016-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++17.cc b/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++17.cc
index 0cfab7d..8f4dd43 100644
--- a/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++17.cc
+++ b/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++17.cc
@@ -1,5 +1,6 @@
// { dg-options "-std=gnu++17" }
// { dg-do compile }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2016-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/26_numerics/complex/abi_tag.cc b/libstdc++-v3/testsuite/26_numerics/complex/abi_tag.cc
index 09833ad..2f8569e 100644
--- a/libstdc++-v3/testsuite/26_numerics/complex/abi_tag.cc
+++ b/libstdc++-v3/testsuite/26_numerics/complex/abi_tag.cc
@@ -1,5 +1,6 @@
// Test that the C++11 variants of real/imag have an ABI tag
// { dg-do compile { target c++11 } }
+// { dg-require-normal-namespace "" }
#include <complex>
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/complex/synopsis.cc b/libstdc++-v3/testsuite/26_numerics/headers/complex/synopsis.cc
index 1153186..7ab5e76 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/complex/synopsis.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/complex/synopsis.cc
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/valarray/synopsis.cc b/libstdc++-v3/testsuite/26_numerics/headers/valarray/synopsis.cc
index 2983aa7..886d817 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/valarray/synopsis.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/valarray/synopsis.cc
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/27_io/headers/fstream/synopsis.cc b/libstdc++-v3/testsuite/27_io/headers/fstream/synopsis.cc
index f434f40..bc914b6 100644
--- a/libstdc++-v3/testsuite/27_io/headers/fstream/synopsis.cc
+++ b/libstdc++-v3/testsuite/27_io/headers/fstream/synopsis.cc
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/27_io/headers/ios/synopsis.cc b/libstdc++-v3/testsuite/27_io/headers/ios/synopsis.cc
index c16d677..1d3ba28 100644
--- a/libstdc++-v3/testsuite/27_io/headers/ios/synopsis.cc
+++ b/libstdc++-v3/testsuite/27_io/headers/ios/synopsis.cc
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/27_io/headers/istream/synopsis.cc b/libstdc++-v3/testsuite/27_io/headers/istream/synopsis.cc
index 0173f1c..894964a 100644
--- a/libstdc++-v3/testsuite/27_io/headers/istream/synopsis.cc
+++ b/libstdc++-v3/testsuite/27_io/headers/istream/synopsis.cc
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/27_io/headers/ostream/synopsis.cc b/libstdc++-v3/testsuite/27_io/headers/ostream/synopsis.cc
index 7529c77..f3778cc 100644
--- a/libstdc++-v3/testsuite/27_io/headers/ostream/synopsis.cc
+++ b/libstdc++-v3/testsuite/27_io/headers/ostream/synopsis.cc
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/27_io/headers/sstream/synopsis.cc b/libstdc++-v3/testsuite/27_io/headers/sstream/synopsis.cc
index b925ee8..b746368 100644
--- a/libstdc++-v3/testsuite/27_io/headers/sstream/synopsis.cc
+++ b/libstdc++-v3/testsuite/27_io/headers/sstream/synopsis.cc
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/27_io/headers/streambuf/synopsis.cc b/libstdc++-v3/testsuite/27_io/headers/streambuf/synopsis.cc
index 2af15bb..93658ff 100644
--- a/libstdc++-v3/testsuite/27_io/headers/streambuf/synopsis.cc
+++ b/libstdc++-v3/testsuite/27_io/headers/streambuf/synopsis.cc
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/lib/dg-options.exp b/libstdc++-v3/testsuite/lib/dg-options.exp
index a276001..4de6bcc 100644
--- a/libstdc++-v3/testsuite/lib/dg-options.exp
+++ b/libstdc++-v3/testsuite/lib/dg-options.exp
@@ -61,6 +61,15 @@ proc dg-require-normal-mode { args } {
return
}
+proc dg-require-normal-namespace { args } {
+ if { ![ check_v3_target_normal_namespace ] } {
+ upvar dg-do-what dg-do-what
+ set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
+ return
+ }
+ return
+}
+
proc dg-require-parallel-mode { args } {
if { ![ check_v3_target_parallel_mode ] } {
upvar dg-do-what dg-do-what
diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index d530403..7861098 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -1141,7 +1141,10 @@ proc check_v3_target_normal_mode { } {
set src normal_mode[pid].cc
set f [open $src "w"]
- puts $f "#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PROFILE) || defined(_GLIBCXX_PARALLEL)"
+ puts $f "#include <bits/c++config.h>"
+ puts $f "#if defined(_GLIBCXX_DEBUG) || \\"
+ puts $f " defined(_GLIBCXX_PROFILE) || \\"
+ puts $f " defined(_GLIBCXX_PARALLEL)"
puts $f "# error No normal mode"
puts $f "#endif"
close $f
@@ -1158,6 +1161,53 @@ proc check_v3_target_normal_mode { } {
return $et_normal_mode
}
+proc check_v3_target_normal_namespace { } {
+ global et_normal_namespace
+ global tool
+
+ if { ![info exists et_normal_namespace_target_name] } {
+ set et_normal_namespace_target_name ""
+ }
+
+ # If the target has changed since we set the cached value, clear it.
+ set current_target [current_target_name]
+ if { $current_target != $et_normal_namespace_target_name } {
+ verbose "check_v3_target_normal_namespace: `$et_normal_namespace_target_name'" 2
+ set et_normal_namespace_target_name $current_target
+ if [info exists et_normal_namespace] {
+ verbose "check_v3_target_normal_namespace: removing cached result" 2
+ unset et_normal_namespace
+ }
+ }
+
+ if [info exists et_normal_namespace] {
+ verbose "check_v3_target_normal_namespace: using cached result" 2
+ } else {
+ set et_normal_namespace 0
+
+ # Set up and compile a C++ test program that depends
+ # on normal std namespace.
+ set src normal_namespace[pid].cc
+
+ set f [open $src "w"]
+ puts $f "#include <bits/c++config.h>"
+ puts $f "#if _GLIBCXX_INLINE_VERSION"
+ puts $f "# error No normal namespace"
+ puts $f "#endif"
+ close $f
+
+ set lines [v3_target_compile $src /dev/null preprocess ""]
+ file delete $src
+
+ if [string match "" $lines] {
+ # No error message, compilation succeeded.
+ set et_normal_namespace 1
+ }
+ }
+ verbose "check_v3_target_normal_namespace: $et_normal_namespace" 2
+ return $et_normal_namespace
+}
+
proc check_v3_target_parallel_mode { } {
global cxxflags
global v3-libgomp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Make tests failing with version namespace UNSUPPORTED
2017-10-23 20:09 ` François Dumont
@ 2017-10-23 22:19 ` Jonathan Wakely
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Wakely @ 2017-10-23 22:19 UTC (permalink / raw)
To: François Dumont; +Cc: libstdc++, gcc-patches
On 23/10/17 22:07 +0200, François Dumont wrote:
>Hi
>
>Â Â Â I completed execution of all tests and added the
>dg-require-normal-namespace to a few more files.
>
>Â Â Â I also eventually prefer to keep dg-require-normal-mode and
>dg-require-normal-namespace seperated, the first for alternative
>modes, the latter for versioned namespace.
That seems better, thanks.
>Â Â Â With this patch there is no more conformance tests failing with
>versioned namespace.
Excellent!
>Ok to commit ?
Yes, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-23 22:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-27 20:40 Make tests failing with version namespace UNSUPPORTED François Dumont
2017-10-23 20:09 ` François Dumont
2017-10-23 22:19 ` Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).