aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/rv-reinterpret.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/rv-reinterpret.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/rv-reinterpret.C10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/rv-reinterpret.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/rv-reinterpret.C
new file mode 100644
index 0000000..b55b67a
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/rv-reinterpret.C
@@ -0,0 +1,10 @@
+// { dg-do run { target c++11 } }
+
+void f(int &);
+void f(int &&ir) { ir = 42; }
+int main()
+{
+ int x;
+ f(reinterpret_cast<int&&>(x));
+ return (x != 42);
+}