diff options
author | Jason Merrill <jason@redhat.com> | 2014-06-27 17:38:24 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2014-06-27 17:38:24 -0400 |
commit | 1ed5f1d3f1e0b9886e0d2910869b7eb62ae75564 (patch) | |
tree | e6b8ed1922c32cf26698fec9ff11670ef2376e77 | |
parent | 8274b281879404286fb36ab4dee3e69442a837cd (diff) | |
download | gcc-1ed5f1d3f1e0b9886e0d2910869b7eb62ae75564.zip gcc-1ed5f1d3f1e0b9886e0d2910869b7eb62ae75564.tar.gz gcc-1ed5f1d3f1e0b9886e0d2910869b7eb62ae75564.tar.bz2 |
re PR c++/61433 (ICE: SIGSEGV in friend_accessible_p (search.c:778) with -std=gnu++11 -O -fcompare-debug -fno-inline -fno-ipa-pure-const -fipa-sra)
PR c++/61433
* error.c (dump_template_bindings): Don't tsubst in a clone.
From-SVN: r212091
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/error.c | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/debug/dwarf2/pr61433.C | 23 |
3 files changed, 33 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 90ec8ad..2236a5c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2014-06-27 Jason Merrill <jason@redhat.com> + + PR c++/61433 + * error.c (dump_template_bindings): Don't tsubst in a clone. + 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com> PR c++/61614 diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 27a167a..fa3bdc4 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -318,6 +318,11 @@ dump_template_bindings (cxx_pretty_printer *pp, tree parms, tree args, if (vec_safe_is_empty (typenames) || uses_template_parms (args)) return; + /* Don't try to print typenames when we're processing a clone. */ + if (current_function_decl + && !DECL_LANG_SPECIFIC (current_function_decl)) + return; + FOR_EACH_VEC_SAFE_ELT (typenames, i, t) { if (need_semicolon) diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pr61433.C b/gcc/testsuite/g++.dg/debug/dwarf2/pr61433.C new file mode 100644 index 0000000..a63b8a9 --- /dev/null +++ b/gcc/testsuite/g++.dg/debug/dwarf2/pr61433.C @@ -0,0 +1,23 @@ +// PR c++/61433 +// { dg-do compile { target c++11 } } +// { dg-options "-O -fcompare-debug -fno-inline -fno-ipa-pure-const -fipa-sra" } + +template <class T> +struct A +{ + template <class V> + struct B + { + int MEM; + }; +}; +struct D {}; +struct C: public A<int>::B<D> +{}; +template <class T, class U, class V> +auto k(T t, U u, V v) -> decltype (t.U::template B<V>::MEM) +{} +int main() +{ + k( C(), A<int>(), D() ); +} |