From 5f215a70bac6405482f21a584a1bb654e123ab7f Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Mon, 6 Mar 2017 11:54:37 +0000 Subject: [PATCH] re PR c++/64574 (ICE (stack overflow SEGV) with bad template specialization) 2017-03-06 Paolo Carlini PR c++/64574 * g++.dg/template/crash125.C: New. From-SVN: r245916 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/template/crash125.C | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 gcc/testsuite/g++.dg/template/crash125.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 636cbee8803..43c19c34795 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-03-06 Paolo Carlini + + PR c++/64574 + * g++.dg/template/crash125.C: New. + 2017-03-06 Jakub Jelinek 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 00000000000..448f74682d4 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/crash125.C @@ -0,0 +1,18 @@ +// PR c++/64574 + +template +class TraitCheckImpl; + +template +class Swappable; +template >::Complete> +class Swappable; + +template +struct TraitCheckImpl > { + typedef void Complete; +}; + +Swappable s; // { dg-error "depth" } + +// { dg-prune-output "compilation terminated" } -- 2.30.2