re PR c++/24569 (ICE in add_AT_specification, at dwarf2out.c:4966)

PR c++/24569
	* pt.c (instantiate_decl): Use cp_finish_decl, not
	finish_static_data_member_decl. 
	PR c++/24569
	* g++.dg/debug/static1.C: New test.

From-SVN: r106392
This commit is contained in:
Mark Mitchell 2005-11-02 18:30:26 +00:00 committed by Mark Mitchell
parent c80e917130
commit 86414779a6
4 changed files with 30 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2005-11-02 Mark Mitchell <mark@codesourcery.com>
PR c++/24569
* pt.c (instantiate_decl): Use cp_finish_decl, not
finish_static_data_member_decl.
2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
* decl.c (grokfndecl): Remove the setting

View file

@ -11630,9 +11630,8 @@ instantiate_decl (tree d, int defer_ok,
init = tsubst_expr (DECL_INITIAL (code_pattern),
args,
tf_error | tf_warning, NULL_TREE);
DECL_INITIAL (d) = NULL_TREE;
finish_static_data_member_decl (d, init,
/*asmspec_tree=*/NULL_TREE,
DECL_INITIAL (d) = init;
cp_finish_decl (d, init, /*asmspec_tree=*/NULL_TREE,
LOOKUP_ONLYCONVERTING);
pop_nested_class ();
pop_nested_namespace (ns);

View file

@ -1,3 +1,8 @@
2005-11-02 Mark Mitchell <mark@codesourcery.com>
PR c++/24569
* g++.dg/debug/static1.C: New test.
2005-11-02 Josh Conner <jconner@apple.com>
* g++.dg/crash38.C: moved into proper directory...

View file

@ -0,0 +1,16 @@
// PR c++/24569
template <int dim>
struct S
{
static const int u = 2 * dim;
static const int p[u];
static int f();
};
template <>
inline int S<3>::f () { return 1; }
template <int dim> const int S<dim>::u;
template class S<3>;