From 6df34b29aea9b6b09d05f46d6aa5eb7645947a15 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Wed, 19 Nov 2014 09:36:40 +0000 Subject: [PATCH] re PR c++/57654 ([c++11] static class member reference-to-a-reference will not compile) 2014-11-19 Paolo Carlini PR c++/57654 * g++.dg/cpp0x/constexpr-ref7.C: New. From-SVN: r217756 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/constexpr-ref7.C | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/constexpr-ref7.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 19b6c01b78f..c42d725b3e8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-11-19 Paolo Carlini + + PR c++/57654 + * g++.dg/cpp0x/constexpr-ref7.C: New. + 2014-11-19 Jakub Jelinek PR sanitizer/63913 diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ref7.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ref7.C new file mode 100644 index 00000000000..72c8d089d77 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ref7.C @@ -0,0 +1,11 @@ +// PR c++/57654 +// { dg-do compile { target c++11 } } + +int i; + +constexpr int & iref = i; +constexpr int & irefref = iref; + +class A { + static constexpr int & irefref = iref; +}; -- 2.30.2