PR c++/9457
* pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
CONSTRUCTOR_ELTS only once.
* g++.dg/template/init1.C: New test.
From-SVN: r63002
+2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/9457
+ * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
+ CONSTRUCTOR_ELTS only once.
+
2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9459
initializers as they are identifier nodes which will be
looked up by digest_init. */
purpose_p = !(type && IS_AGGR_TYPE (type));
- for (elts = tsubst_copy (CONSTRUCTOR_ELTS (t), args, complain,
- in_decl);
+ for (elts = CONSTRUCTOR_ELTS (t);
elts;
elts = TREE_CHAIN (elts))
{
+2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/9457
+ * g++.dg/template/init1.C: New test.
+
Sun Feb 16 23:08:19 CET 2003 Jan HUbicka <jh@suse.cz>
* gcc.dg/c90-const-expr-3.c (DZERO): New static variable
--- /dev/null
+// { dg-do compile }
+
+// Origin: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
+
+// PR c++/9457: ICE tsubst'ing initializers in templates.
+
+template <typename> void foo (int count) {
+ int i = {count};
+}
+template void foo<int> (int);