re PR c++/64954 (GCC incorrectly rejects constexpr variable initialization.)
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 20 Sep 2017 07:53:27 +0000 (07:53 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 20 Sep 2017 07:53:27 +0000 (07:53 +0000)
2017-09-20  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/64954
* g++.dg/cpp0x/constexpr-ctor20.C: New.

From-SVN: r253002

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

index 43d0ab30171253dddb16a8b987f0a65c4f79d51e..d0cea296d6ae66aec0d9c80a750e702600431abd 100644 (file)
@@ -1,3 +1,8 @@
+2017-09-20  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/64954
+       * g++.dg/cpp0x/constexpr-ctor20.C: New.
+
 2017-09-20  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/81373
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor20.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor20.C
new file mode 100644 (file)
index 0000000..d5df3f6
--- /dev/null
@@ -0,0 +1,8 @@
+// PR c++/64954
+// { dg-do compile { target c++11 } }
+
+struct A {};
+int main() {
+    A a;
+    constexpr A b = a;
+}