diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2017-03-06 11:54:37 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2017-03-06 11:54:37 +0000 |
commit | 5f215a70bac6405482f21a584a1bb654e123ab7f (patch) | |
tree | c40d41e4a461b752b664915d780f0baa2b6b2e48 /gcc | |
parent | 296cc393ef40d49f9e8cd9ce7280cb173dbf93d8 (diff) | |
download | gcc-5f215a70bac6405482f21a584a1bb654e123ab7f.zip gcc-5f215a70bac6405482f21a584a1bb654e123ab7f.tar.gz gcc-5f215a70bac6405482f21a584a1bb654e123ab7f.tar.bz2 |
re PR c++/64574 (ICE (stack overflow SEGV) with bad template specialization)
2017-03-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/64574
* g++.dg/template/crash125.C: New.
From-SVN: r245916
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/template/crash125.C | 18 |
2 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 636cbee..43c19c3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-03-06 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/64574 + * g++.dg/template/crash125.C: New. + 2017-03-06 Jakub Jelinek <jakub@redhat.com> PR target/79812 diff --git a/gcc/testsuite/g++.dg/template/crash125.C b/gcc/testsuite/g++.dg/template/crash125.C new file mode 100644 index 0000000..448f746 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/crash125.C @@ -0,0 +1,18 @@ +// PR c++/64574 + +template<class T> +class TraitCheckImpl; + +template<class T, class> +class Swappable; +template<class T, class=typename TraitCheckImpl<Swappable<T, void> >::Complete> +class Swappable; + +template<class T> +struct TraitCheckImpl<Swappable<T> > { + typedef void Complete; +}; + +Swappable<int> s; // { dg-error "depth" } + +// { dg-prune-output "compilation terminated" } |