From 6a06deb4d6037f8ca0a606479dc7065764fbd864 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Fri, 29 Aug 2014 12:47:19 +0000 Subject: [PATCH] re PR c++/57764 (class static constexpr variables cannot be references) 2014-08-29 Paolo Carlini PR c++/57764 * g++.dg/cpp0x/constexpr-57764.C: New. From-SVN: r214728 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/constexpr-57764.C | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/constexpr-57764.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b799e792199..0cf20a760c0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-08-29 Paolo Carlini + + PR c++/57764 + * g++.dg/cpp0x/constexpr-57764.C: New. + 2014-08-29 Paolo Carlini PR c++/59938 diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-57764.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-57764.C new file mode 100644 index 00000000000..b26f4b50449 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-57764.C @@ -0,0 +1,11 @@ +// PR c++/57764 +// { dg-do compile { target c++11 } } + +constexpr int x = 42; + +struct S +{ + static constexpr int const & y = x; +}; + +constexpr int const & S::y; -- 2.30.2