re PR c++/79457 (Segmentation fault in templated decltype evaluation)
PR c++/79457 * g++.dg/cpp0x/pr79457.C: New test. From-SVN: r245344
This commit is contained in:
parent
6a2cc46b79
commit
e493f96b95
2 changed files with 29 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2017-02-10 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/79457
|
||||
* g++.dg/cpp0x/pr79457.C: New test.
|
||||
|
||||
2017-02-10 Segher Boessenkool <segher@kernel.crashing.org>
|
||||
|
||||
* gcc.target/powerpc/fold-vec-mult-longlong.c: Don't do the
|
||||
|
|
24
gcc/testsuite/g++.dg/cpp0x/pr79457.C
Normal file
24
gcc/testsuite/g++.dg/cpp0x/pr79457.C
Normal file
|
@ -0,0 +1,24 @@
|
|||
// PR c++/79457
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
template <typename T>
|
||||
class Foo
|
||||
{
|
||||
private:
|
||||
T& goo;
|
||||
template <typename R>
|
||||
using S = decltype (goo[R ()]);
|
||||
|
||||
public:
|
||||
Foo (T& goo) : goo {goo} {}
|
||||
|
||||
template <typename R>
|
||||
S<R> boo () {}
|
||||
};
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int bar[] = {1, 2, 3};
|
||||
Foo<decltype (bar)> foo {bar};
|
||||
}
|
Loading…
Add table
Reference in a new issue