diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2017-10-15 22:29:59 +0000 |
---|---|---|
committer | Paolo Carlini <paolo.carlini@oracle.com> | 2017-10-15 22:29:59 +0000 |
commit | a91b869b772234bf34e4ff2e869d2d751c6fc52b (patch) | |
tree | e711a96b83ac3cf89fc65ecfe4646e865d58045b | |
parent | df078576a92dfe42d83c1baacdca8219a249b14b (diff) |
2017-10-15 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54090
* g++.dg/template/crash128.C: New.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@253772 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/template/crash128.C | 19 |
2 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d8436266a5b..ff99cba66b7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-10-15 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/54090 + * g++.dg/template/crash128.C: New. + 2017-10-15 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/82372 diff --git a/gcc/testsuite/g++.dg/template/crash128.C b/gcc/testsuite/g++.dg/template/crash128.C new file mode 100644 index 00000000000..2682e3dc3ce --- /dev/null +++ b/gcc/testsuite/g++.dg/template/crash128.C @@ -0,0 +1,19 @@ +// PR c++/54090 + +template <int n> +struct X { + + template <int N, bool = (n >= N), typename T = void> struct Y; + + template <int N, typename T> + struct Y<N, true, T> {}; + + static const int M = n / 2; + + template <typename T> + struct Y<X::M, true, T> {}; +}; + +void foo() { + X<10>::Y<10/2> y; +} |