Commit c2a124b2 by Mark Mitchell Committed by Mark Mitchell

re PR c++/17163 (ICE with -frepo and static class variables)

	PR c++/17163
	* pt.c (instantiate_decl): Do not try to apply
	DECL_DECLARED_INLINED_P to a VAR_DECL.

	PR c++/17163
	* g++.dg/template/repo2.C: New test.

From-SVN: r86467
parent a2fe1975
2004-08-23 Mark Mitchell <mark@codesourcery.com>
PR c++/17163
* pt.c (instantiate_decl): Do not try to apply
DECL_DECLARED_INLINED_P to a VAR_DECL.
* search.c (build_baselink): Fix typo in comment.
2004-08-22 Andrew Pinski <apinski@apple.com> 2004-08-22 Andrew Pinski <apinski@apple.com>
Revert: Revert:
......
...@@ -11183,7 +11183,9 @@ instantiate_decl (tree d, int defer_ok, int undefined_ok) ...@@ -11183,7 +11183,9 @@ instantiate_decl (tree d, int defer_ok, int undefined_ok)
/* Instantiate inline functions so that the inliner can do its /* Instantiate inline functions so that the inliner can do its
job, even though we'll not be emitting a copy of this job, even though we'll not be emitting a copy of this
function. */ function. */
if (!flag_inline_trees || !DECL_DECLARED_INLINE_P (d)) if (!(TREE_CODE (d) == FUNCTION_DECL
&& flag_inline_trees
&& DECL_DECLARED_INLINE_P (d)))
goto out; goto out;
} }
......
...@@ -1135,7 +1135,7 @@ lookup_field_r (tree binfo, void *data) ...@@ -1135,7 +1135,7 @@ lookup_field_r (tree binfo, void *data)
return NULL_TREE; return NULL_TREE;
} }
/* Return a "baselink" which BASELINK_BINFO, BASELINK_ACCESS_BINFO, /* Return a "baselink" with BASELINK_BINFO, BASELINK_ACCESS_BINFO,
BASELINK_FUNCTIONS, and BASELINK_OPTYPE set to BINFO, ACCESS_BINFO, BASELINK_FUNCTIONS, and BASELINK_OPTYPE set to BINFO, ACCESS_BINFO,
FUNCTIONS, and OPTYPE respectively. */ FUNCTIONS, and OPTYPE respectively. */
......
2004-08-23 Mark Mitchell <mark@codesourcery.com>
PR c++/17163
* g++.dg/template/repo2.C: New test.
2004-08-23 Roger Sayle <roger@eyesopen.com> 2004-08-23 Roger Sayle <roger@eyesopen.com>
PR rtl-optimization/17078 PR rtl-optimization/17078
......
// PR c++/17163
// { dg-options "-frepo" }
template <int __inst>
struct __Atomicity_lock
{
static unsigned char _S_atomicity_lock;
};
template <int __inst>
unsigned char __Atomicity_lock<__inst>::_S_atomicity_lock = 0;
template unsigned char __Atomicity_lock<0>::_S_atomicity_lock;
int main () {
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment