From 8b93f82995bf99268a0dca835306d945449a33e0 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Thu, 8 Jan 2015 17:48:38 +0000 Subject: [PATCH] re PR c++/64462 (ICE while compiling lambda using local constexpr reference variable) 2015-01-08 Paolo Carlini PR c++/64462 * g++.dg/cpp0x/constexpr-64462.C: New. From-SVN: r219352 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/constexpr-64462.C | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/constexpr-64462.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e692f4699d4..8ed09aed3f1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-01-08 Paolo Carlini + + PR c++/64462 + * g++.dg/cpp0x/constexpr-64462.C: New. + 2015-01-08 Paolo Carlini PR c++/60753 diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-64462.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-64462.C new file mode 100644 index 00000000000..69193fd0db7 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-64462.C @@ -0,0 +1,10 @@ +// PR c++/64462 +// { dg-do compile { target c++11 } } + +int x = 0; +int z; + +int main() { + constexpr int& y = x; + [=] { z = y; }(); +} -- 2.30.2