aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2011-09-25 10:43:00 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2011-09-25 10:43:00 +0000
commit13ec1ccaaa69f1b12be42b3bb91f4223eea7e4df (patch)
tree2b1ddf86b96e7f1aa565e438ed91dd1461ec2002 /gcc
parent4e4452b65bec5b86a66ee9782b7fab345800da3b (diff)
downloadgcc-13ec1ccaaa69f1b12be42b3bb91f4223eea7e4df.zip
gcc-13ec1ccaaa69f1b12be42b3bb91f4223eea7e4df.tar.gz
gcc-13ec1ccaaa69f1b12be42b3bb91f4223eea7e4df.tar.bz2
re PR c++/50280 (Incorrect type deduced for T& when passed a const bitfield)
2011-09-25 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50280 * g++.dg/template/bitfield1.C: New. From-SVN: r179163
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/template/bitfield1.C11
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a5c9e43..9c34f59 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-09-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/50280
+ * g++.dg/template/bitfield1.C: New.
+
2011-09-25 Ira Rosen <ira.rosen@linaro.org>
* gcc.dg/vect/bb-slp-24.c: New.
diff --git a/gcc/testsuite/g++.dg/template/bitfield1.C b/gcc/testsuite/g++.dg/template/bitfield1.C
new file mode 100644
index 0000000..9484cb7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/bitfield1.C
@@ -0,0 +1,11 @@
+// PR c++/50280
+
+struct S { int bf : 3; };
+
+template<class _T1>
+void make_pair(_T1& __x) {}
+
+void foo() {
+ const S s = S();
+ make_pair(s.bf);
+}