aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-18 11:57:16 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-18 11:57:16 +0000
commitd7d7321ee02eba4dc8167c30e5a60f7093043f3f (patch)
treedbb8af896a8b82c95a4ae20400b7f80d27fc997b
parent4a8aa3586ae172f39b57b70b45e12842e9345b64 (diff)
2014-11-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/60245 * g++.dg/cpp0x/constexpr-60245.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217709 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-60245.C8
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f677becd88b..5abda800beb 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2014-11-18 Paolo Carlini <paolo.carlini@oracle.com>
+ PR c++/60245
+ * g++.dg/cpp0x/constexpr-60245.C: New.
+
+2014-11-18 Paolo Carlini <paolo.carlini@oracle.com>
+
PR c++/60771
* g++.dg/cpp0x/constexpr-ref6.C: New.
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-60245.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-60245.C
new file mode 100644
index 00000000000..803a2299677
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-60245.C
@@ -0,0 +1,8 @@
+// PR c++/60245
+// { dg-do compile { target c++11 } }
+
+constexpr int Apply(const int in, int (*f)(const int&)) { return f(in); }
+
+using Foo = int;
+static constexpr int id(const Foo& i) { return i; }
+static constexpr int results1 = Apply(0, &id);