aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-06-29 20:51:13 -0400
committerJason Merrill <jason@gcc.gnu.org>2010-06-29 20:51:13 -0400
commit9a71b305bf556ad173b123d2d58612652b82e6dc (patch)
tree2bc73889c856176b1bd79beac62f6c6af63acf4b
parentac1774315cb7ebc781ade2f9fd99de1c258b9221 (diff)
downloadgcc-9a71b305bf556ad173b123d2d58612652b82e6dc.zip
gcc-9a71b305bf556ad173b123d2d58612652b82e6dc.tar.gz
gcc-9a71b305bf556ad173b123d2d58612652b82e6dc.tar.bz2
* decl2.c (mark_used): Adjust error for use of deleted function.
From-SVN: r161580
-rw-r--r--gcc/cp/ChangeLog2
-rw-r--r--gcc/cp/decl2.c5
-rw-r--r--gcc/testsuite/ChangeLog9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted10.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted13.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted2.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted3.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist9.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-errloc.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-errloc2.C4
-rw-r--r--gcc/testsuite/g++.dg/init/synth2.C2
-rw-r--r--libstdc++-v3/ChangeLog38
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc6
-rw-r--r--libstdc++-v3/testsuite/20_util/function/cmp/cmp_neg.cc7
-rw-r--r--libstdc++-v3/testsuite/20_util/unique_ptr/assign/assign_neg.cc19
-rw-r--r--libstdc++-v3/testsuite/20_util/unique_ptr/cons/pointer_array_convertible.cc3
-rw-r--r--libstdc++-v3/testsuite/20_util/unique_ptr/modifiers/reset_neg.cc5
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc18
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic_address/cons/assign_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic_address/cons/copy_neg.cc6
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/assign_neg.cc6
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/copy_neg.cc6
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc11
-rw-r--r--libstdc++-v3/testsuite/30_threads/condition_variable/cons/assign_neg.cc5
-rw-r--r--libstdc++-v3/testsuite/30_threads/condition_variable/cons/copy_neg.cc5
-rw-r--r--libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/assign_neg.cc5
-rw-r--r--libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/copy_neg.cc5
-rw-r--r--libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc5
-rw-r--r--libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc5
-rw-r--r--libstdc++-v3/testsuite/30_threads/mutex/cons/assign_neg.cc5
-rw-r--r--libstdc++-v3/testsuite/30_threads/mutex/cons/copy_neg.cc5
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc5
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc5
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc5
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc5
-rw-r--r--libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/assign_neg.cc5
-rw-r--r--libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/copy_neg.cc5
-rw-r--r--libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc5
-rw-r--r--libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc5
-rw-r--r--libstdc++-v3/testsuite/30_threads/thread/cons/assign_neg.cc5
-rw-r--r--libstdc++-v3/testsuite/30_threads/thread/cons/copy_neg.cc12
-rw-r--r--libstdc++-v3/testsuite/30_threads/timed_mutex/cons/assign_neg.cc5
-rw-r--r--libstdc++-v3/testsuite/30_threads/timed_mutex/cons/copy_neg.cc5
-rw-r--r--libstdc++-v3/testsuite/ext/ext_pointer/1_neg.cc6
46 files changed, 146 insertions, 146 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index a8df233..9ac64c4 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,7 @@
2010-06-29 Jason Merrill <jason@redhat.com>
+ * decl2.c (mark_used): Adjust error for use of deleted function.
+
Machinery to support implicit delete/move.
* cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
has_complex_move_ctor, has_complex_move_assign bitfields.
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 1e088e0..ce54c79 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -4110,8 +4110,9 @@ mark_used (tree decl)
return;
}
}
- error ("deleted function %q+D", decl);
- error ("used here");
+ error ("use of deleted function %qD", decl);
+ if (!maybe_explain_implicit_delete (decl))
+ error_at (DECL_SOURCE_LOCATION (decl), "declared here");
return;
}
/* If we don't need a value, then we don't need to synthesize DECL. */
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 2d1aa2d..cf7180a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,14 @@
2010-06-29 Jason Merrill <jason@redhat.com>
+ * g++.dg/cpp0x/defaulted10.C: Adjust for new deleted message.
+ * g++.dg/cpp0x/defaulted13.C: Adjust.
+ * g++.dg/cpp0x/defaulted2.C: Adjust.
+ * g++.dg/cpp0x/defaulted3.C: Adjust.
+ * g++.dg/cpp0x/initlist9.C: Adjust.
+ * g++.dg/cpp0x/lambda/lambda-errloc.C: Adjust.
+ * g++.dg/cpp0x/lambda/lambda-errloc2.C: Adjust.
+ * g++.dg/init/synth2.C: Adjust.
+
* g++.dg/cpp0x/defaulted19.C: New.
* g++.dg/expr/string-1.C: Fix for -std=c++0x.
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted10.C b/gcc/testsuite/g++.dg/cpp0x/defaulted10.C
index d169e0c..64fa5f0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted10.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted10.C
@@ -3,12 +3,12 @@
struct A
{
- template<typename T> void foo(T) = delete; // { dg-error "previously|deleted" }
+ template<typename T> void foo(T) = delete; // { dg-error "previously|declared" }
};
template<typename T> void A::foo(T) {} // { dg-error "redefinition" }
void bar()
{
- A().foo(0); // { dg-error "used" }
+ A().foo(0); // { dg-error "use" }
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted13.C b/gcc/testsuite/g++.dg/cpp0x/defaulted13.C
index 87b8100..8b23579 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted13.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted13.C
@@ -7,22 +7,22 @@ struct NonCopyable {
};
template<>
-NonCopyable<int>::NonCopyable(NonCopyable<int> const&) = delete; // { dg-error "deleted" }
+NonCopyable<int>::NonCopyable(NonCopyable<int> const&) = delete; // { dg-error "declared" }
template<typename T>
NonCopyable<T>::NonCopyable(NonCopyable<T> const&) = default;
template<>
-NonCopyable<double>::NonCopyable(NonCopyable<double> const&) = delete; // { dg-error "deleted" }
+NonCopyable<double>::NonCopyable(NonCopyable<double> const&) = delete; // { dg-error "declared" }
int main()
{
NonCopyable<double> nc_dbl;
- NonCopyable<double> nc_dbl_cpy(nc_dbl); // { dg-error "used here" }
+ NonCopyable<double> nc_dbl_cpy(nc_dbl); // { dg-error "use" }
NonCopyable<int> nc_int;
- NonCopyable<int> nc_int_cpy(nc_int); // { dg-error "used here" }
+ NonCopyable<int> nc_int_cpy(nc_int); // { dg-error "use" }
NonCopyable<char> nc_char;
NonCopyable<char> nc_char_cpy(nc_char);
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted2.C b/gcc/testsuite/g++.dg/cpp0x/defaulted2.C
index ad3274a..909ebc5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted2.C
@@ -41,7 +41,7 @@ struct E
struct F
{
F() = default;
- F(const F&) = delete; // { dg-error "deleted" }
+ F(const F&) = delete; // { dg-error "declared" }
};
struct G
@@ -60,7 +60,7 @@ union U
int main()
{
F f;
- F f2(f); // { dg-error "used" }
+ F f2(f); // { dg-error "use" }
B* b = new const B; // { dg-error "uninitialized const" }
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted3.C b/gcc/testsuite/g++.dg/cpp0x/defaulted3.C
index efde415..5e2116b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted3.C
@@ -4,7 +4,7 @@
template<class T>
struct A {
template<class U>
- bool operator==(const A<U>&) = delete; // { dg-error "deleted function" }
+ bool operator==(const A<U>&) = delete; // { dg-error "declared" }
operator bool () { return true; }
};
@@ -12,5 +12,5 @@ int main()
{
A<int> a1;
A<void> a2;
- if(a1 == a2) {} // { dg-error "used here" }
+ if(a1 == a2) {} // { dg-error "use" }
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist9.C b/gcc/testsuite/g++.dg/cpp0x/initlist9.C
index 2bc2d17..d596b39 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist9.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist9.C
@@ -8,7 +8,7 @@ struct b
b() = default;
~b() = default;
b& operator=(const b&) = delete;
- b(const b&) = delete; // { dg-error "deleted" }
+ b(const b&) = delete; // { dg-error "declared" }
b(bool _t): t (_t) { }
};
@@ -19,7 +19,7 @@ int main()
b tst1 = { false };
// copy initialization.
- b tst2 = false; // { dg-error "used here" }
+ b tst2 = false; // { dg-error "use" }
// direct list initialization
b tst3 { false };
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-errloc.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-errloc.C
index 4037331..f476669 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-errloc.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-errloc.C
@@ -5,7 +5,7 @@
struct A
{
A();
- A(const A& a) = delete; // { dg-error "deleted" }
+ A(const A& a) = delete; // { dg-error "declared" }
};
int main()
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-errloc2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-errloc2.C
index 3d53c13..dab53f1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-errloc2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-errloc2.C
@@ -3,14 +3,14 @@
struct A {
A();
- A(const A&) = delete; // { dg-error "deleted function" }
+ A(const A&) = delete; // { dg-error "declared" }
};
template <class T>
void f()
{
T t;
- [t] { return 0; }; // { dg-error "used here" }
+ [t] { return 0; }; // { dg-error "use" }
}
int main()
diff --git a/gcc/testsuite/g++.dg/init/synth2.C b/gcc/testsuite/g++.dg/init/synth2.C
index 624f10b..507db34 100644
--- a/gcc/testsuite/g++.dg/init/synth2.C
+++ b/gcc/testsuite/g++.dg/init/synth2.C
@@ -13,5 +13,5 @@ class A // { dg-error "no match" }
int main()
{
A a;
- A b = a; // { dg-message "required here" }
+ A b = a; // { dg-message "required here|deleted" }
}
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 0feb6fd..5e0ebf8 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,41 @@
+2010-06-29 Jason Merrill <jason@redhat.com>
+
+ * 19_diagnostics/error_category/cons/copy_neg.cc: Adjust expected
+ errors, use dg-prune-output.
+ * 20_util/function/cmp/cmp_neg.cc: Likewise.
+ * 20_util/unique_ptr/assign/assign_neg.cc: Likewise.
+ * 20_util/unique_ptr/cons/pointer_array_convertible.cc: Likewise.
+ * 20_util/unique_ptr/modifiers/reset_neg.cc: Likewise.
+ * 29_atomics/atomic/cons/assign_neg.cc: Likewise.
+ * 29_atomics/atomic/cons/copy_neg.cc: Likewise.
+ * 29_atomics/atomic_address/cons/assign_neg.cc: Likewise.
+ * 29_atomics/atomic_address/cons/copy_neg.cc: Likewise.
+ * 29_atomics/atomic_flag/cons/assign_neg.cc: Likewise.
+ * 29_atomics/atomic_flag/cons/copy_neg.cc: Likewise.
+ * 29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
+ * 29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
+ * 29_atomics/condition_variable/cons/assign_neg.cc: Likewise.
+ * 30_threads/condition_variable/cons/copy_neg.cc: Likewise.
+ * 30_threads/condition_variable_any/cons/assign_neg.cc: Likewise.
+ * 30_threads/condition_variable_any/cons/copy_neg.cc: Likewise.
+ * 30_threads/future/cons/assign_neg.cc: Likewise.
+ * 30_threads/future/cons/copy_neg.cc: Likewise.
+ * 30_threads/mutex/cons/assign_neg.cc: Likewise.
+ * 30_threads/mutex/cons/copy_neg.cc: Likewise.
+ * 30_threads/packaged_task/cons/assign_neg.cc: Likewise.
+ * 30_threads/packaged_task/cons/copy_neg.cc: Likewise.
+ * 30_threads/promise/cons/assign_neg.cc: Likewise.
+ * 30_threads/promise/cons/copy_neg.cc: Likewise.
+ * 30_threads/recursive_mutex/cons/assign_neg.cc: Likewise.
+ * 30_threads/recursive_mutex/cons/copy_neg.cc: Likewise.
+ * 30_threads/recursive_timed_mutex/cons/assign_neg.cc: Likewise.
+ * 30_threads/recursive_timed_mutex/cons/copy_neg.cc: Likewise.
+ * 30_threads/thread/cons/assign_neg.cc: Likewise.
+ * 30_threads/thread/cons/copy_neg.cc: Likewise.
+ * 30_threads/timed_mutex/cons/assign_neg.cc: Likewise.
+ * 30_threads/timed_mutex/cons/copy_neg.cc: Likewise.
+ * ext/ext_pointer/1_neg.cc: Likewise.
+
2010-06-29 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/44708
diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc b/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc
index 3b74f7e..12258ca 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc
@@ -27,10 +27,10 @@ int main()
bool test __attribute__((unused)) = true;
__gnu_test::test_category c1;
- __gnu_test::test_category c2(c1); // { dg-error "first required here" }
+ __gnu_test::test_category c2(c1); // { dg-error "deleted" }
return 0;
}
-// { dg-error "deleted function" "" { target *-*-* } 72 }
-// { dg-error "used here" "" { target *-*-* } 30 }
+// { dg-prune-output "testsuite_error" }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/20_util/function/cmp/cmp_neg.cc b/libstdc++-v3/testsuite/20_util/function/cmp/cmp_neg.cc
index a196ef6..bb3c25d 100644
--- a/libstdc++-v3/testsuite/20_util/function/cmp/cmp_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/function/cmp/cmp_neg.cc
@@ -18,15 +18,16 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+// { dg-prune-output "include" }
+
#include <functional>
void test01()
{
std::function<void()> f1;
std::function<void()> f2;
- f1 == f2; // { dg-error "here" }
- f1 != f2; // { dg-error "here" }
- // { dg-excess-errors "" }
+ f1 == f2; // { dg-error "deleted" }
+ f1 != f2; // { dg-error "deleted" }
}
int main()
diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/assign/assign_neg.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/assign/assign_neg.cc
index 40404f6..95c1d5d 100644
--- a/libstdc++-v3/testsuite/20_util/unique_ptr/assign/assign_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/unique_ptr/assign/assign_neg.cc
@@ -39,25 +39,14 @@ void
test02()
{
std::unique_ptr<int[]> p1(new int(420));
- std::unique_ptr<int[]> p2 = p1;
+ std::unique_ptr<int[]> p2 = p1; // { dg-error "deleted" }
}
void
test03()
{
- std::unique_ptr<int[2]> p1(new int[3]);
- std::unique_ptr<int[2]> p2 = p1;
+ std::unique_ptr<int[2]> p1(new int[3]); // { dg-error "no match" }
+ std::unique_ptr<int[2]> p2 = p1; // { dg-error "deleted" }
}
-// { dg-error "deleted function" "" { target *-*-* } 373 }
-// { dg-error "used here" "" { target *-*-* } 42 }
-// { dg-error "no matching" "" { target *-*-* } 48 }
-// { dg-warning "note" "" { target *-*-* } 137 }
-// { dg-warning "note" "" { target *-*-* } 133 }
-// { dg-warning "note" "" { target *-*-* } 128 }
-// { dg-warning "note" "" { target *-*-* } 122 }
-// { dg-warning "note" "" { target *-*-* } 117 }
-// { dg-warning "note" "" { target *-*-* } 112 }
-// { dg-warning "note" "" { target *-*-* } 106 }
-// { dg-error "deleted function" "" { target *-*-* } 225 }
-// { dg-error "used here" "" { target *-*-* } 49 }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/cons/pointer_array_convertible.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/cons/pointer_array_convertible.cc
index 7e0f307..2a4a89b 100644
--- a/libstdc++-v3/testsuite/20_util/unique_ptr/cons/pointer_array_convertible.cc
+++ b/libstdc++-v3/testsuite/20_util/unique_ptr/cons/pointer_array_convertible.cc
@@ -37,4 +37,5 @@ test01()
{
std::unique_ptr<B[]> B_from_A(new A[3]); //{ dg-error "invalid conversion from" }
}
-//{ dg-excess-errors "initialization" }
+
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/modifiers/reset_neg.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/modifiers/reset_neg.cc
index 27dd879..29bb57d 100644
--- a/libstdc++-v3/testsuite/20_util/unique_ptr/modifiers/reset_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/unique_ptr/modifiers/reset_neg.cc
@@ -32,8 +32,7 @@ struct B : A
void test01()
{
std::unique_ptr<B[]> up;
- up.reset(new A[3]);
+ up.reset(new A[3]); // { dg-error "deleted" }
}
-// { dg-error "used here" "" { target *-*-* } 35 }
-// { dg-error "deleted function" "" { target *-*-* } 363 }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc
index c56678c..66f5a81 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc
@@ -29,4 +29,4 @@ int main()
}
// { dg-error "ambiguous" "" { target *-*-* } 522 }
-// { dg-excess-errors "In member function" }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc
index d70a66c..69b1eff 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc
@@ -28,19 +28,5 @@ int main()
return 0;
}
-// { dg-error "used here" "" { target *-*-* } 561 }
-// { dg-error "deleted function" "" { target *-*-* } 229 }
-// { dg-error "deleted function" "" { target *-*-* } 247 }
-// { dg-error "deleted function" "" { target *-*-* } 265 }
-// { dg-error "deleted function" "" { target *-*-* } 283 }
-// { dg-error "deleted function" "" { target *-*-* } 301 }
-// { dg-error "deleted function" "" { target *-*-* } 319 }
-// { dg-error "deleted function" "" { target *-*-* } 337 }
-// { dg-error "deleted function" "" { target *-*-* } 355 }
-// { dg-error "deleted function" "" { target *-*-* } 373 }
-// { dg-error "deleted function" "" { target *-*-* } 391 }
-// { dg-error "deleted function" "" { target *-*-* } 409 }
-// { dg-error "deleted function" "" { target *-*-* } 427 }
-// { dg-error "deleted function" "" { target *-*-* } 445 }
-// { dg-error "deleted function" "" { target *-*-* } 463 }
-// { dg-error "deleted function" "" { target *-*-* } 481 }
+// { dg-error "deleted" "" { target *-*-* } 561 }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_address/cons/assign_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_address/cons/assign_neg.cc
index ac4c567..9405e45 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_address/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_address/cons/assign_neg.cc
@@ -28,4 +28,4 @@ void test01()
test_type t2;
t1 = t2; // { dg-error "ambiguous" }
}
-// { dg-excess-errors "deleted function" }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_address/cons/copy_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_address/cons/copy_neg.cc
index 4ede58f..69f78ee 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_address/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_address/cons/copy_neg.cc
@@ -25,7 +25,7 @@ void test01()
// Copy.
typedef std::atomic_address test_type;
test_type t1;
- test_type t2(t1);
+ test_type t2(t1); // { dg-error "deleted" }
}
-// { dg-error "used here" "" { target *-*-* } 28 }
-// { dg-excess-errors "deleted function" }
+
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/assign_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/assign_neg.cc
index 924add8..27c60ca 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/assign_neg.cc
@@ -26,7 +26,7 @@ void test01()
typedef std::atomic_flag test_type;
test_type t1;
test_type t2;
- t1 = t2;
+ t1 = t2; // { dg-error "deleted" }
}
-// { dg-error "used here" "" { target *-*-* } 29 }
-// { dg-excess-errors "deleted function" }
+
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/copy_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/copy_neg.cc
index 22cea6a..9244f68 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/copy_neg.cc
@@ -25,7 +25,7 @@ void test01()
// Copy.
typedef std::atomic_flag test_type;
test_type t1;
- test_type t2(t1);
+ test_type t2(t1); // { dg-error "deleted" }
}
-// { dg-error "used here" "" { target *-*-* } 28 }
-// { dg-excess-errors "deleted function" }
+
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc
index 875906f..751c6cd 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc
@@ -30,4 +30,4 @@ int main()
}
// { dg-error "ambiguous" "" { target *-*-* } 522 }
-// { dg-excess-errors "In member function" }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc
index e1559a5..976a699 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc
@@ -29,12 +29,5 @@ int main()
return 0;
}
-// { dg-error "used here" "" { target *-*-* } 561 }
-// { dg-excess-errors "deleted function" }
-// { dg-excess-errors "deleted function" }
-// { dg-error "instantiated from" "" { target *-*-* } 28 }
-// { dg-error "instantiated from" "" { target *-*-* } 567 }
-// { dg-error "instantiated from" "" { target *-*-* } 170 }
-// { dg-error "instantiated from" "" { target *-*-* } 399 }
-// { dg-error "instantiated from" "" { target *-*-* } 168 }
-// { dg-excess-errors "In member function" }
+// { dg-error "deleted" "" { target *-*-* } 561 }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/condition_variable/cons/assign_neg.cc
index 9e9ad8a..9064820 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable/cons/assign_neg.cc
@@ -28,8 +28,7 @@ void test01()
// assign
std::condition_variable c1;
std::condition_variable c2;
- c1 = c2;
+ c1 = c2; // { dg-error "deleted" }
}
-// { dg-error "used here" "" { target *-*-* } 31 }
-// { dg-error "deleted function" "" { target *-*-* } 70 }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/condition_variable/cons/copy_neg.cc
index 5765351..588e4f3 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable/cons/copy_neg.cc
@@ -27,8 +27,7 @@ void test01()
{
// copy
std::condition_variable c1;
- std::condition_variable c2(c1);
+ std::condition_variable c2(c1); // { dg-error "deleted" }
}
-// { dg-error "used here" "" { target *-*-* } 30 }
-// { dg-error "deleted function" "" { target *-*-* } 69 }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/assign_neg.cc
index 8fa79a2..dac106c 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/assign_neg.cc
@@ -28,8 +28,7 @@ void test01()
// assign
std::condition_variable_any c1;
std::condition_variable_any c2;
- c1 = c2;
+ c1 = c2; // { dg-error "deleted" }
}
-// { dg-error "used here" "" { target *-*-* } 31 }
-// { dg-error "deleted function" "" { target *-*-* } 179 }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/copy_neg.cc
index 344f90c..157f60f 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/copy_neg.cc
@@ -27,8 +27,7 @@ void test01()
{
// copy
std::condition_variable_any c1;
- std::condition_variable_any c2(c1);
+ std::condition_variable_any c2(c1); // { dg-error "deleted" }
}
-// { dg-error "used here" "" { target *-*-* } 30 }
-// { dg-error "deleted function" "" { target *-*-* } 178 }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc
index eef4149..2aad5e9 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc
@@ -31,8 +31,7 @@ void test01()
// assign
std::future<int>& p1 = get();
std::future<int>& p2 = get();
- p1 = p2;
+ p1 = p2; // { dg-error "deleted" }
}
-// { dg-error "used here" "" { target *-*-* } 34 }
-// { dg-error "deleted function" "" { target *-*-* } 581 }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc
index 14d7046..5e6bcca 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc
@@ -30,8 +30,7 @@ void test01()
{
// copy
std::future<int>& p1 = get();
- std::future<int> p2(p1);
+ std::future<int> p2(p1); // { dg-error "deleted" }
}
-// { dg-error "used here" "" { target *-*-* } 33 }
-// { dg-error "deleted function" "" { target *-*-* } 580 }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/30_threads/mutex/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/mutex/cons/assign_neg.cc
index 7e9d30b..2012234 100644
--- a/libstdc++-v3/testsuite/30_threads/mutex/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/mutex/cons/assign_neg.cc
@@ -29,8 +29,7 @@ void test01()
typedef std::mutex mutex_type;
mutex_type m1;
mutex_type m2;
- m1 = m2;
+ m1 = m2; // { dg-error "deleted" }
}
-// { dg-error "used here" "" { target *-*-* } 32 }
-// { dg-error "deleted function" "" { target *-*-* } 82 }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/30_threads/mutex/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/mutex/cons/copy_neg.cc
index c1ef051..3fd1cd9 100644
--- a/libstdc++-v3/testsuite/30_threads/mutex/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/mutex/cons/copy_neg.cc
@@ -28,8 +28,7 @@ void test01()
// assign
typedef std::mutex mutex_type;
mutex_type m1;
- mutex_type m2(m1);
+ mutex_type m2(m1); // { dg-error "deleted" }
}
-// { dg-error "used here" "" { target *-*-* } 31 }
-// { dg-error "deleted function" "" { target *-*-* } 81 }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc
index 2b57a1c..414c861 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc
@@ -29,8 +29,7 @@ void test01()
// assign
std::packaged_task<int()> p1;
std::packaged_task<int()> p2;
- p1 = p2;
+ p1 = p2; // { dg-error "deleted" }
}
-// { dg-error "used here" "" { target *-*-* } 32 }
-// { dg-error "deleted function" "" { target *-*-* } 1228 }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc
index baf7183..93b0821 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc
@@ -28,8 +28,7 @@ void test01()
{
// copy
std::packaged_task<int()> p1;
- std::packaged_task<int()> p2(p1);
+ std::packaged_task<int()> p2(p1); // { dg-error "deleted" }
}
-// { dg-error "used here" "" { target *-*-* } 31 }
-// { dg-error "deleted function" "" { target *-*-* } 1227 }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc
index 80b5e06..50b1c6e 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc
@@ -29,8 +29,7 @@ void test01()
// assign
std::promise<int> p1;
std::promise<int> p2;
- p1 = p2;
+ p1 = p2; // { dg-error "deleted" }
}
-// { dg-error "used here" "" { target *-*-* } 32 }
-// { dg-error "deleted function" "" { target *-*-* } 871 }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc
index 27884b0..5e43d0b 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc
@@ -28,8 +28,7 @@ void test01()
{
// copy
std::promise<int> p1;
- std::promise<int> p2(p1);
+ std::promise<int> p2(p1); // { dg-error "deleted" }
}
-// { dg-error "used here" "" { target *-*-* } 31 }
-// { dg-error "deleted function" "" { target *-*-* } 855 }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/assign_neg.cc
index 42af439..2eeefd3 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/assign_neg.cc
@@ -29,8 +29,7 @@ void test01()
typedef std::recursive_mutex mutex_type;
mutex_type m1;
mutex_type m2;
- m1 = m2;
+ m1 = m2; // { dg-error "deleted" }
}
-// { dg-error "used here" "" { target *-*-* } 32 }
-// { dg-error "deleted function" "" { target *-*-* } 134 }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/copy_neg.cc
index 53ff57d..232a701 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/copy_neg.cc
@@ -28,8 +28,7 @@ void test01()
// assign
typedef std::recursive_mutex mutex_type;
mutex_type m1;
- mutex_type m2(m1);
+ mutex_type m2(m1); // { dg-error "deleted" }
}
-// { dg-error "used here" "" { target *-*-* } 31 }
-// { dg-error "deleted function" "" { target *-*-* } 133 }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc
index 7fa6428..1694423 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc
@@ -29,8 +29,7 @@ void test01()
typedef std::recursive_timed_mutex mutex_type;
mutex_type m1;
mutex_type m2;
- m1 = m2;
+ m1 = m2; // { dg-error "deleted" }
}
-// { dg-error "used here" "" { target *-*-* } 32 }
-// { dg-error "deleted function" "" { target *-*-* } 297 }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc
index df1ca0b..c729d5b 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc
@@ -28,8 +28,7 @@ void test01()
// assign
typedef std::recursive_timed_mutex mutex_type;
mutex_type m1;
- mutex_type m2(m1);
+ mutex_type m2(m1); // { dg-error "deleted" }
}
-// { dg-error "used here" "" { target *-*-* } 31 }
-// { dg-error "deleted function" "" { target *-*-* } 296 }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/assign_neg.cc
index 1170579..406d160 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/cons/assign_neg.cc
@@ -28,8 +28,7 @@ void test01()
typedef std::thread test_type;
test_type t1;
test_type t2;
- t1 = t2;
+ t1 = t2; // { dg-error "deleted" }
}
-// { dg-error "used here" "" { target *-*-* } 31 }
-// { dg-error "deleted function" "" { target *-*-* } 148 }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/copy_neg.cc
index 898ad16..db06e72 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/cons/copy_neg.cc
@@ -27,9 +27,13 @@ void test01()
// copy
typedef std::thread test_type;
test_type t1;
- test_type t2(t1); // XXX this is failing for the wrong reason
+ test_type t2(t1); // { dg-error "deleted" "" { xfail *-*-* } }
}
-// { dg-error "here" "" { target *-*-* } 30 }
-// { dg-error "deleted function" "" { target *-*-* } 126 }
-// { dg-excess-errors "In file included from" }
+// This is failing for the wrong reason; it should fail because we're
+// trying to call the deleted copy constructor, but instead it fails
+// because we try to call the thread(_Callable&&,_Args&&...) constructor
+// and fail because thread isn't callable. But that's OK for now.
+// { dg-error "" "" { target *-*-* } 30 }
+
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/assign_neg.cc
index 45b2385..7c9199f 100644
--- a/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/assign_neg.cc
@@ -29,8 +29,7 @@ void test01()
typedef std::timed_mutex mutex_type;
mutex_type m1;
mutex_type m2;
- m1 = m2;
+ m1 = m2; // { dg-error "deleted" }
}
-// { dg-error "used here" "" { target *-*-* } 32 }
-// { dg-error "deleted function" "" { target *-*-* } 192 }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/copy_neg.cc
index 04dea64..2c38896 100644
--- a/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/copy_neg.cc
@@ -28,8 +28,7 @@ void test01()
// assign
typedef std::timed_mutex mutex_type;
mutex_type m1;
- mutex_type m2(m1);
+ mutex_type m2(m1); // { dg-error "deleted" }
}
-// { dg-error "used here" "" { target *-*-* } 31 }
-// { dg-error "deleted function" "" { target *-*-* } 191 }
+// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/ext/ext_pointer/1_neg.cc b/libstdc++-v3/testsuite/ext/ext_pointer/1_neg.cc
index c599aca..0ceb9a6 100644
--- a/libstdc++-v3/testsuite/ext/ext_pointer/1_neg.cc
+++ b/libstdc++-v3/testsuite/ext/ext_pointer/1_neg.cc
@@ -91,8 +91,4 @@ void test01(void) {
aptr5 = __const_pointer_cast<B_pointer>(cbptr); // ok
}
-// { dg-error "invalid conversion " "" { target *-*-* } 314 }
-// { dg-error "invalid conversion " "" { target *-*-* } 308 }
-// { dg-error "invalid conversion " "" { target *-*-* } 331 }
-// { dg-error "invalid conversion " "" { target *-*-* } 339 }
-// { dg-excess-errors "In constructor" }
+// { dg-prune-output "include" }