From: Paolo Carlini Date: Fri, 29 Aug 2014 12:47:19 +0000 (+0000) Subject: re PR c++/57764 (class static constexpr variables cannot be references) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6a06deb4d6037f8ca0a606479dc7065764fbd864;p=gcc.git 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 --- 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;