mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-06 15:40:53 +08:00
re PR c++/9457 (ICE in tsubst_copy, at cp/pt.c:7124)
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
This commit is contained in:
parent
e6ddcef66a
commit
db77ef4c93
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -8290,8 +8290,7 @@ tsubst_copy_and_build (t, args, complain, in_decl)
|
||||
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))
|
||||
{
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
10
gcc/testsuite/g++.dg/template/init1.C
Normal file
10
gcc/testsuite/g++.dg/template/init1.C
Normal file
@ -0,0 +1,10 @@
|
||||
// { 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);
|
Loading…
Reference in New Issue
Block a user