2014-11-18 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 18 Nov 2014 11:57:16 +0000 (11:57 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 18 Nov 2014 11:57:16 +0000 (11:57 +0000)
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

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-60245.C [new file with mode: 0644]

index f677bec..5abda80 100644 (file)
@@ -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 (file)
index 0000000..803a229
--- /dev/null
@@ -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);