From adcffce38c42372f91af404340c14420870648b6 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Wed, 10 Jul 2013 23:16:38 +0000 Subject: [PATCH] re PR c++/57827 (compiler segmentation fault) 2013-07-10 Paolo Carlini PR c++/57827 * g++.dg/cpp0x/constexpr-ice7.C: New. From-SVN: r200892 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/constexpr-ice7.C | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/constexpr-ice7.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3d6b6805303..d14d49cf154 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-07-10 Paolo Carlini + + PR c++/57827 + * g++.dg/cpp0x/constexpr-ice7.C: New. + 2013-07-10 Janis Johnson * gcc.target/powerpc/20020118-1.c: Force 128-bit stack alignment diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice7.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice7.C new file mode 100644 index 00000000000..4fa3a831454 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice7.C @@ -0,0 +1,15 @@ +// PR c++/57827 +// { dg-do compile { target c++11 } } + +struct C +{ + constexpr int fun (int x) + { + return x + 1; + } + + int a = 2; + int b = fun(a); +}; + +C c; -- 2.30.2