summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/defaulted37.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/defaulted37.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted37.C10
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted37.C b/gcc/testsuite/g++.dg/cpp0x/defaulted37.C
index 69105cc3146..1926f2eb4cc 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted37.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted37.C
@@ -3,13 +3,11 @@
struct A
{
- int moved = 0;
- A& operator=(A&&) { ++moved; }
- ~A() { if (moved > 1) __builtin_abort(); }
+ A& operator=(A&&);
};
-struct B: virtual A { B& operator=(B&&) = default; };
-struct C: virtual A { }; // { dg-error "operator=.const A&" }
+struct B: virtual A { B& operator=(B&&) = default; }; // { dg-warning "virtual base" }
+struct C: virtual A { }; // { dg-warning "virtual base" }
int main()
{
@@ -17,5 +15,5 @@ int main()
b2 = static_cast<B&&>(b1);
C c1, c2;
- c2 = static_cast<C&&>(c1); // { dg-error "operator=.const C&" }
+ c2 = static_cast<C&&>(c1);
}