From 0f45457ef436fd85549281064ab74ee55247b13c Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Wed, 20 Sep 2017 07:53:27 +0000 Subject: [PATCH] re PR c++/64954 (GCC incorrectly rejects constexpr variable initialization.) 2017-09-20 Paolo Carlini PR c++/64954 * g++.dg/cpp0x/constexpr-ctor20.C: New. From-SVN: r253002 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/constexpr-ctor20.C | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/constexpr-ctor20.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 43d0ab30171..d0cea296d6a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-09-20 Paolo Carlini + + PR c++/64954 + * g++.dg/cpp0x/constexpr-ctor20.C: New. + 2017-09-20 Richard Biener 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 index 00000000000..d5df3f6b36c --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor20.C @@ -0,0 +1,8 @@ +// PR c++/64954 +// { dg-do compile { target c++11 } } + +struct A {}; +int main() { + A a; + constexpr A b = a; +} -- 2.30.2