libstdc++.exp ([check_v3_target_normal_mode]): Add.
2010-10-26 Paolo Carlini <paolo.carlini@oracle.com> * testsuite/lib/libstdc++.exp ([check_v3_target_normal_mode]): Add. * testsuite/lib/dg-options.exp ([dg-require-normal-mode]): Likewise. * testsuite/23_containers/headers/forward_list/synopsis.cc: Use the latter. * testsuite/23_containers/headers/vector/synopsis.cc: Likewise. * testsuite/23_containers/headers/deque/synopsis.cc: Likewise. * testsuite/23_containers/headers/bitset/synopsis.cc: Likewise. * testsuite/23_containers/headers/list/synopsis.cc: Likewise. * testsuite/23_containers/headers/set/synopsis.cc: Likewise. * testsuite/23_containers/headers/map/synopsis.cc: Likewise. From-SVN: r165937
This commit is contained in:
parent
6739e9ec6e
commit
98fff892cc
10 changed files with 97 additions and 14 deletions
|
@ -1,3 +1,16 @@
|
|||
2010-10-26 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
* testsuite/lib/libstdc++.exp ([check_v3_target_normal_mode]): Add.
|
||||
* testsuite/lib/dg-options.exp ([dg-require-normal-mode]): Likewise.
|
||||
* testsuite/23_containers/headers/forward_list/synopsis.cc: Use the
|
||||
latter.
|
||||
* testsuite/23_containers/headers/vector/synopsis.cc: Likewise.
|
||||
* testsuite/23_containers/headers/deque/synopsis.cc: Likewise.
|
||||
* testsuite/23_containers/headers/bitset/synopsis.cc: Likewise.
|
||||
* testsuite/23_containers/headers/list/synopsis.cc: Likewise.
|
||||
* testsuite/23_containers/headers/set/synopsis.cc: Likewise.
|
||||
* testsuite/23_containers/headers/map/synopsis.cc: Likewise.
|
||||
|
||||
2010-10-25 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
* include/bits/forward_list.h (_Fwd_list_node_base::swap): Remove.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// { dg-do compile }
|
||||
// { dg-require-normal-mode "" }
|
||||
|
||||
// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// { dg-do compile }
|
||||
// { dg-require-normal-mode "" }
|
||||
|
||||
// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
// { dg-do compile }
|
||||
// { dg-require-normal-mode "" }
|
||||
// { dg-options "-std=gnu++0x" }
|
||||
|
||||
// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
|
@ -24,22 +25,28 @@ namespace std {
|
|||
template <class T, class Allocator> class forward_list;
|
||||
|
||||
template <class T, class Allocator>
|
||||
bool operator==(const forward_list<T,Allocator>& x, const forward_list<T,Allocator>&);
|
||||
bool operator==(const forward_list<T,Allocator>& x,
|
||||
const forward_list<T,Allocator>&);
|
||||
|
||||
template <class T, class Allocator>
|
||||
bool operator< (const forward_list<T,Allocator>& x, const forward_list<T,Allocator>&);
|
||||
bool operator< (const forward_list<T,Allocator>& x,
|
||||
const forward_list<T,Allocator>&);
|
||||
|
||||
template <class T, class Allocator>
|
||||
bool operator!=(const forward_list<T,Allocator>& x, const forward_list<T,Allocator>&);
|
||||
bool operator!=(const forward_list<T,Allocator>& x,
|
||||
const forward_list<T,Allocator>&);
|
||||
|
||||
template <class T, class Allocator>
|
||||
bool operator> (const forward_list<T,Allocator>& x, const forward_list<T,Allocator>&);
|
||||
bool operator> (const forward_list<T,Allocator>& x,
|
||||
const forward_list<T,Allocator>&);
|
||||
|
||||
template <class T, class Allocator>
|
||||
bool operator>=(const forward_list<T,Allocator>& x, const forward_list<T,Allocator>&);
|
||||
bool operator>=(const forward_list<T,Allocator>& x,
|
||||
const forward_list<T,Allocator>&);
|
||||
|
||||
template <class T, class Allocator>
|
||||
bool operator<=(const forward_list<T,Allocator>& x, const forward_list<T,Allocator>&);
|
||||
bool operator<=(const forward_list<T,Allocator>& x,
|
||||
const forward_list<T,Allocator>&);
|
||||
|
||||
template <class T, class Allocator>
|
||||
void swap(forward_list<T,Allocator>& x, forward_list<T,Allocator>& y);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// { dg-do compile }
|
||||
// { dg-require-normal-mode "" }
|
||||
|
||||
// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// { dg-do compile }
|
||||
// { dg-require-normal-mode "" }
|
||||
|
||||
// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// { dg-do compile }
|
||||
// { dg-require-normal-mode "" }
|
||||
|
||||
// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// { dg-do compile }
|
||||
// { dg-require-normal-mode "" }
|
||||
|
||||
// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
|
|
|
@ -35,6 +35,15 @@ proc dg-require-debug-mode { args } {
|
|||
return
|
||||
}
|
||||
|
||||
proc dg-require-normal-mode { args } {
|
||||
if { ![ check_v3_target_normal_mode ] } {
|
||||
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
|
||||
|
|
|
@ -922,7 +922,6 @@ proc check_v3_target_debug_mode { } {
|
|||
set exe debug_mode[pid].exe
|
||||
|
||||
set f [open $src "w"]
|
||||
puts $f "#include <string>"
|
||||
puts $f "#ifndef _GLIBCXX_DEBUG"
|
||||
puts $f "# error No debug mode"
|
||||
puts $f "#endif"
|
||||
|
@ -942,6 +941,55 @@ proc check_v3_target_debug_mode { } {
|
|||
return $et_debug_mode
|
||||
}
|
||||
|
||||
proc check_v3_target_normal_mode { } {
|
||||
global et_normal_mode
|
||||
global tool
|
||||
|
||||
if { ![info exists et_normal_mode_target_name] } {
|
||||
set et_normal_mode_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_mode_target_name } {
|
||||
verbose "check_v3_target_normal_mode: `$et_normal_mode_target_name'" 2
|
||||
set et_normal_mode_target_name $current_target
|
||||
if [info exists et_normal_mode] {
|
||||
verbose "check_v3_target_normal_mode: removing cached result" 2
|
||||
unset et_normal_mode
|
||||
}
|
||||
}
|
||||
|
||||
if [info exists et_normal_mode] {
|
||||
verbose "check_v3_target_normal_mode: using cached result" 2
|
||||
} else {
|
||||
set et_normal_mode 0
|
||||
|
||||
# Set up and compile a C++ test program that depends
|
||||
# on normal mode activated.
|
||||
set src normal_mode[pid].cc
|
||||
set exe normal_mode[pid].exe
|
||||
|
||||
set f [open $src "w"]
|
||||
puts $f "#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PROFILE) || defined(_GLIBCXX_PARALLEL)"
|
||||
puts $f "# error No normal mode"
|
||||
puts $f "#endif"
|
||||
puts $f "int main()"
|
||||
puts $f "{ return 0; }"
|
||||
close $f
|
||||
|
||||
set lines [v3_target_compile $src $exe executable ""]
|
||||
file delete $src
|
||||
|
||||
if [string match "" $lines] {
|
||||
# No error message, compilation succeeded.
|
||||
set et_normal_mode 1
|
||||
}
|
||||
}
|
||||
verbose "check_v3_target_normal_mode: $et_normal_mode" 2
|
||||
return $et_normal_mode
|
||||
}
|
||||
|
||||
proc check_v3_target_parallel_mode { } {
|
||||
global cxxflags
|
||||
global v3-libgomp
|
||||
|
|
Loading…
Add table
Reference in a new issue