From: Jakub Jelinek Date: Fri, 10 Feb 2017 20:58:31 +0000 (+0100) Subject: re PR c++/79457 (Segmentation fault in templated decltype evaluation) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e493f96b95161fcc8a4e3bfcc6edda400216d3f8;p=gcc.git re PR c++/79457 (Segmentation fault in templated decltype evaluation) PR c++/79457 * g++.dg/cpp0x/pr79457.C: New test. From-SVN: r245344 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a143d7c4443..7a5abd8a333 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-02-10 Jakub Jelinek + + PR c++/79457 + * g++.dg/cpp0x/pr79457.C: New test. + 2017-02-10 Segher Boessenkool * gcc.target/powerpc/fold-vec-mult-longlong.c: Don't do the diff --git a/gcc/testsuite/g++.dg/cpp0x/pr79457.C b/gcc/testsuite/g++.dg/cpp0x/pr79457.C new file mode 100644 index 00000000000..937e0e00726 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr79457.C @@ -0,0 +1,24 @@ +// PR c++/79457 +// { dg-do compile { target c++11 } } + +template +class Foo +{ +private: + T& goo; + template + using S = decltype (goo[R ()]); + +public: + Foo (T& goo) : goo {goo} {} + + template + S boo () {} +}; + +int +main () +{ + int bar[] = {1, 2, 3}; + Foo foo {bar}; +}