From fc2770b996c502dfa71980b7f3a4e2b0cf688275 Mon Sep 17 00:00:00 2001 From: Paolo Carlini <paolo.carlini@oracle.com> Date: Fri, 19 Dec 2014 16:50:31 +0000 Subject: [PATCH] re PR c++/60493 (g++ throws segmentation fault on simple code) 2014-12-19 Paolo Carlini <paolo.carlini@oracle.com> PR c++/60493 * g++.dg/template/crash120.C: New. From-SVN: r218957 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/template/crash120.C | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 gcc/testsuite/g++.dg/template/crash120.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9c46504032a..39f8ad2358b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-12-19 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/60493 + * g++.dg/template/crash120.C: New. + 2014-12-19 Kai Tietz <ktietz@redhat.com> PR c++/61198 diff --git a/gcc/testsuite/g++.dg/template/crash120.C b/gcc/testsuite/g++.dg/template/crash120.C new file mode 100644 index 00000000000..9d15c2e6604 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/crash120.C @@ -0,0 +1,18 @@ +// PR c++/60493 + +template <class T, class U> +struct foo +{ +}; +template <class T> +struct baz +{ + class bar; +}; + +template <class T, class D> +struct baz<T>::bar : foo<int, D> // { dg-error "parameters|required" } +{ +}; + +baz<int>::bar it; // { dg-error "incomplete" }