diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2014-08-29 12:47:19 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2014-08-29 12:47:19 +0000 |
commit | 6a06deb4d6037f8ca0a606479dc7065764fbd864 (patch) | |
tree | b7d6f9fa4a1285b3c58c89defdfd333c9eaa3589 | |
parent | dee29e84edf944f6fa7b16d3e2d236ea81637087 (diff) | |
download | gcc-6a06deb4d6037f8ca0a606479dc7065764fbd864.zip gcc-6a06deb4d6037f8ca0a606479dc7065764fbd864.tar.gz gcc-6a06deb4d6037f8ca0a606479dc7065764fbd864.tar.bz2 |
re PR c++/57764 (class static constexpr variables cannot be references)
2014-08-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57764
* g++.dg/cpp0x/constexpr-57764.C: New.
From-SVN: r214728
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/constexpr-57764.C | 11 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b799e79..0cf20a7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2014-08-29 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/57764 + * g++.dg/cpp0x/constexpr-57764.C: New. + +2014-08-29 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/59938 * g++.dg/cpp0x/constexpr-59938.C: New. 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 0000000..b26f4b5 --- /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; |