summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-22 10:23:03 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-22 10:23:03 +0000
commit9e6ac2e5971687465e75325432250091f7e5f87e (patch)
treea74c7f72bd4c79fc081b07bdd26fd5d43d021595
parent5f90dfbd0fbe0eeee3aa3eca5266e1d77592f28b (diff)
downloadgcc-9e6ac2e5971687465e75325432250091f7e5f87e.tar.gz
2012-11-22 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/55432 * g++.dg/cpp0x/constexpr-55432.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193723 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-55432.C22
2 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index cb52cdc5afe..382affd8d12 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2012-11-22 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/55432
+ * g++.dg/cpp0x/constexpr-55432.C: New.
+
2012-11-21 Janus Weil <janus@gcc.gnu.org>
PR fortran/55352
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-55432.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-55432.C
new file mode 100644
index 00000000000..56b09bda017
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-55432.C
@@ -0,0 +1,22 @@
+// PR c++/55432
+// { dg-do compile { target c++11 } }
+
+struct tag_t{} tag{};
+
+constexpr tag_t const& pass(tag_t & t)
+{
+ return t;
+}
+
+struct S
+{
+ constexpr S(tag_t) {};
+};
+
+struct T
+{
+ S mem;
+ T( tag_t & args ) : mem(pass(args)) {}
+};
+
+T t(tag);