]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR c++/57644 - [C++1y] Cannot bind bitfield to lvalue reference
authorEdward Smith-Rowland <3dw4rd@verizon.net>
Sat, 12 Jul 2014 01:41:30 +0000 (01:41 +0000)
committerEdward Smith-Rowland <emsr@gcc.gnu.org>
Sat, 12 Jul 2014 01:41:30 +0000 (01:41 +0000)
2014-07-11  Edward Smith-Rowland  <3dw4rd@verizon.net>

PR c++/57644 - [C++1y] Cannot bind bitfield to lvalue reference
g++.dg/cpp0x/pr57644.C: New.

From-SVN: r212477

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/pr57644.C [new file with mode: 0644]

index dd2b85eceb93f7060beb0159c61f52dafc41de8b..6eaac69e4ee4dbc8b2aecb1c896a2f7528fa4ce2 100644 (file)
@@ -1,3 +1,8 @@
+2014-07-11  Edward Smith-Rowland  <3dw4rd@verizon.net>
+
+       PR c++/57644 - [C++1y] Cannot bind bitfield to lvalue reference
+       g++.dg/cpp0x/pr57644.C: New.
+
 2014-07-11  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/53159
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr57644.C b/gcc/testsuite/g++.dg/cpp1y/pr57644.C
new file mode 100644 (file)
index 0000000..0805721
--- /dev/null
@@ -0,0 +1,13 @@
+// { dg-do compile { target c++1y } }
+
+struct Foo
+{
+  unsigned i: 32;
+};
+
+int
+main()
+{
+  Foo f{};
+  return f.i;
+}