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
This commit is contained in:
Paolo Carlini 2017-03-06 11:54:37 +00:00 committed by Paolo Carlini
parent 296cc393ef
commit 5f215a70ba
2 changed files with 23 additions and 0 deletions

View File

@ -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

View File

@ -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" }