* g++.dg/cpp0x/named.C: Test subobject of xvalue.
authorJason Merrill <jason@redhat.com>
Thu, 30 Jun 2011 21:09:55 +0000 (17:09 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 30 Jun 2011 21:09:55 +0000 (17:09 -0400)
From-SVN: r175731

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/named.C

index ce9314187ddd719f663288aed5e79cded59aa52c..cbcdf77e5532ce19f7c8ffb0c61d1271c3b61b74 100644 (file)
@@ -1,3 +1,7 @@
+2011-06-29  Jason Merrill  <jason@redhat.com>
+
+       * g++.dg/cpp0x/named.C: Test subobject of xvalue.
+
 2011-06-30  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/46787
index ef1a2fb6f7d453a7dedb59dd49d9b09e7e377ec6..2dff24ca475323ec1e69d653d8ff55f703038619 100644 (file)
@@ -13,6 +13,7 @@ struct T
   S && get() { return movel(s); }
   operator S&&() { return movel(s); }
   S && s;
+  S s2;
 };
 
 void named(S const &) {}
@@ -33,6 +34,7 @@ void f(S && p)
   unnamed(t.get());                  // function return
   unnamed(t);                        // implicit conversion
   unnamed(static_cast<S&&>(s));      // cast to rvalue
+  unnamed(static_cast<T&&>(t).s2);   // cast to rvalue
 }
 
 int main()