From: Jason Merrill Date: Mon, 13 Apr 2009 18:54:40 +0000 (-0400) Subject: re PR c++/39750 (ICE in uses_template_parms, at cp/pt.c:6332) X-Git-Tag: releases/gcc-4.5.0~6643 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c1b93f2b526a6beca6a15968fc6938fdfe5b50bc;p=thirdparty%2Fgcc.git re PR c++/39750 (ICE in uses_template_parms, at cp/pt.c:6332) PR c++/39750 * pt.c (uses_template_parms): Handle CONSTRUCTOR. From-SVN: r146006 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 744941c9895e..905b6e431dd1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2009-04-13 Jason Merrill + + PR c++/39750 + * pt.c (uses_template_parms): Handle CONSTRUCTOR. + 2009-04-12 Jason Merrill PR c++/39742 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 24a5bcc8d979..869146efe8ea 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -5391,7 +5391,9 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain) else { /* We must only copy the non-tail padding parts. - Use __builtin_memcpy for the bitwise copy. */ + Use __builtin_memcpy for the bitwise copy. + FIXME fix 22488 so we can go back to using MODIFY_EXPR + instead of an explicit call to memcpy. */ tree arg0, arg1, arg2, t; diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 8dd35795a125..2fd625707232 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -6325,6 +6325,7 @@ uses_template_parms (tree t) || TREE_CODE (t) == BASELINK || TREE_CODE (t) == IDENTIFIER_NODE || TREE_CODE (t) == TRAIT_EXPR + || TREE_CODE (t) == CONSTRUCTOR || CONSTANT_CLASS_P (t)) dependent_p = (type_dependent_expression_p (t) || value_dependent_expression_p (t)); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 36b329dcbd3b..c920a6f20b58 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-04-13 Jason Merrill + + PR c++/39750 + * g++.dg/template/crash90.C: New. + 2009-04-12 Jason Merrill PR c++/39742 diff --git a/gcc/testsuite/g++.dg/template/crash90.C b/gcc/testsuite/g++.dg/template/crash90.C new file mode 100644 index 000000000000..da24359c737c --- /dev/null +++ b/gcc/testsuite/g++.dg/template/crash90.C @@ -0,0 +1,8 @@ +// PR c++/39750 + +template < unsigned > +struct A ; +template < typename > +struct B ; +template < typename T , A < B < T > // { dg-error "" } +{ }