libstdc++.exp (check_v3_target_normal_mode): Add c++config.h include.

2017-10-24  François Dumont  <fdumont@gcc.gnu.org>

	* testsuite/lib/libstdc++.exp (check_v3_target_normal_mode): Add
	c++config.h include.
	(check_v3_target_normal_namespace): New.
	* testsuite/lib/dg-options.exp (dg-require-normal-namespace): New.
	* testsuite/18_support/headers/limits/synopsis.cc: Add latter.
	* testsuite/20_util/from_chars/requirements.cc: Likewise.
	* testsuite/20_util/headers/functional/synopsis.cc: Likewise.
	* testsuite/20_util/headers/memory/synopsis.cc: Likewise.
	* testsuite/20_util/headers/utility/synopsis.cc: Likewise.
	* testsuite/20_util/to_chars/requirements.cc: Likewise.
	* testsuite/21_strings/headers/string/synopsis.cc: Likewise.
	* testsuite/22_locale/headers/locale/synopsis.cc: Likewise.
	* testsuite/23_containers/headers/bitset/synopsis.cc: Likewise.
	* 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/queue/synopsis.cc: Likewise.
	* testsuite/23_containers/headers/set/synopsis.cc: Likewise.
	* testsuite/23_containers/headers/stack/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.
	* testsuite/24_iterators/headers/iterator/synopsis.cc: Likewise.
	* testsuite/24_iterators/headers/iterator/synopsis_c++11.cc: Likewise.
	* testsuite/24_iterators/headers/iterator/synopsis_c++14.cc: Likewise.
	* testsuite/24_iterators/headers/iterator/synopsis_c++17.cc: Likewise.
	* testsuite/26_numerics/complex/abi_tag.cc: Likewise.
	* testsuite/26_numerics/headers/complex/synopsis.cc: Likewise.
	* testsuite/26_numerics/headers/valarray/synopsis.cc: Likewise.
	* testsuite/27_io/headers/fstream/synopsis.cc: Likewise.
	* testsuite/27_io/headers/ios/synopsis.cc: Likewise.
	* testsuite/27_io/headers/istream/synopsis.cc: Likewise.
	* testsuite/27_io/headers/ostream/synopsis.cc: Likewise.
	* testsuite/27_io/headers/sstream/synopsis.cc: Likewise.
	* testsuite/27_io/headers/streambuf/synopsis.cc: Likewise.

From-SVN: r254060
This commit is contained in:
François Dumont 2017-10-24 20:20:12 +00:00
parent 6ab5a6f30f
commit 8468bfe8cb
37 changed files with 453 additions and 319 deletions

View File

@ -1,3 +1,44 @@
2017-10-24 François Dumont <fdumont@gcc.gnu.org>
* testsuite/lib/libstdc++.exp (check_v3_target_normal_mode): Add
c++config.h include.
(check_v3_target_normal_namespace): New.
* testsuite/lib/dg-options.exp (dg-require-normal-namespace): New.
* testsuite/18_support/headers/limits/synopsis.cc: Add latter.
* testsuite/20_util/from_chars/requirements.cc: Likewise.
* testsuite/20_util/headers/functional/synopsis.cc: Likewise.
* testsuite/20_util/headers/memory/synopsis.cc: Likewise.
* testsuite/20_util/headers/utility/synopsis.cc: Likewise.
* testsuite/20_util/to_chars/requirements.cc: Likewise.
* testsuite/21_strings/headers/string/synopsis.cc: Likewise.
* testsuite/22_locale/headers/locale/synopsis.cc: Likewise.
* testsuite/23_containers/headers/bitset/synopsis.cc: Likewise.
* 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/queue/synopsis.cc: Likewise.
* testsuite/23_containers/headers/set/synopsis.cc: Likewise.
* testsuite/23_containers/headers/stack/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.
* testsuite/24_iterators/headers/iterator/synopsis.cc: Likewise.
* testsuite/24_iterators/headers/iterator/synopsis_c++11.cc: Likewise.
* testsuite/24_iterators/headers/iterator/synopsis_c++14.cc: Likewise.
* testsuite/24_iterators/headers/iterator/synopsis_c++17.cc: Likewise.
* testsuite/26_numerics/complex/abi_tag.cc: Likewise.
* testsuite/26_numerics/headers/complex/synopsis.cc: Likewise.
* testsuite/26_numerics/headers/valarray/synopsis.cc: Likewise.
* testsuite/27_io/headers/fstream/synopsis.cc: Likewise.
* testsuite/27_io/headers/ios/synopsis.cc: Likewise.
* testsuite/27_io/headers/istream/synopsis.cc: Likewise.
* testsuite/27_io/headers/ostream/synopsis.cc: Likewise.
* testsuite/27_io/headers/sstream/synopsis.cc: Likewise.
* testsuite/27_io/headers/streambuf/synopsis.cc: Likewise.
2017-10-24 Jonathan Wakely <jwakely@redhat.com>
* config/locale/gnu/c_locale.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Ignore

View File

@ -1,4 +1,5 @@
// { dg-do compile }
// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//

View File

@ -17,6 +17,7 @@
// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// { dg-require-normal-namespace "" }
#include <charconv>

View File

@ -1,4 +1,5 @@
// { dg-do compile }
// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//

View File

@ -1,4 +1,5 @@
// { dg-do compile }
// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//

View File

@ -1,4 +1,5 @@
// { dg-do compile }
// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//

View File

@ -17,6 +17,7 @@
// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// { dg-require-normal-namespace "" }
#include <charconv>

View File

@ -1,4 +1,5 @@
// { dg-do compile }
// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//

View File

@ -1,4 +1,5 @@
// { dg-do compile }
// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//

View File

@ -1,5 +1,6 @@
// { dg-do compile }
// { dg-require-normal-mode "" }
// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//

View File

@ -1,5 +1,6 @@
// { dg-do compile }
// { dg-require-normal-mode "" }
// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//

View File

@ -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.
//

View File

@ -1,5 +1,6 @@
// { dg-do compile }
// { dg-require-normal-mode "" }
// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//

View File

@ -1,5 +1,6 @@
// { dg-do compile }
// { dg-require-normal-mode "" }
// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//

View File

@ -1,4 +1,5 @@
// { dg-do compile }
// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//

View File

@ -1,5 +1,6 @@
// { dg-do compile }
// { dg-require-normal-mode "" }
// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//

View File

@ -1,4 +1,5 @@
// { dg-do compile }
// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//

View File

@ -1,5 +1,6 @@
// { dg-do compile }
// { dg-require-normal-mode "" }
// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//

View File

@ -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.
//

View File

@ -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.
//

View File

@ -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.
//

View File

@ -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.
//

View File

@ -1,5 +1,6 @@
// { dg-options "-std=gnu++98" }
// { dg-do compile }
// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//

View File

@ -1,5 +1,6 @@
// { dg-options "-std=gnu++11" }
// { dg-do compile }
// { dg-require-normal-namespace "" }
// Copyright (C) 2016-2017 Free Software Foundation, Inc.
//

View File

@ -1,5 +1,6 @@
// { dg-options "-std=gnu++14" }
// { dg-do compile }
// { dg-require-normal-namespace "" }
// Copyright (C) 2016-2017 Free Software Foundation, Inc.
//

View File

@ -1,5 +1,6 @@
// { dg-options "-std=gnu++17" }
// { dg-do compile }
// { dg-require-normal-namespace "" }
// Copyright (C) 2016-2017 Free Software Foundation, Inc.
//

View File

@ -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>

View File

@ -1,4 +1,5 @@
// { dg-do compile }
// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//

View File

@ -1,4 +1,5 @@
// { dg-do compile }
// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//

View File

@ -1,4 +1,5 @@
// { dg-do compile }
// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//

View File

@ -1,4 +1,5 @@
// { dg-do compile }
// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//

View File

@ -1,4 +1,5 @@
// { dg-do compile }
// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//

View File

@ -1,4 +1,5 @@
// { dg-do compile }
// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//

View File

@ -1,4 +1,5 @@
// { dg-do compile }
// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//

View File

@ -1,4 +1,5 @@
// { dg-do compile }
// { dg-require-normal-namespace "" }
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
//

View File

@ -52,6 +52,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

View File

@ -1094,7 +1094,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
@ -1111,6 +1114,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