This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [3.3] C++ PATCH: Improving compile-time performance 2/n
- From: Ulrich Weigand <weigand at immd1 dot informatik dot uni-erlangen dot de>
- To: gdr at integrable-solutions dot net
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 16 Mar 2003 01:33:38 +0100 (MET)
- Subject: Re: [3.3] C++ PATCH: Improving compile-time performance 2/n
Gabriel Dos Reis wrote:
> Compile-time improvement: 2/n.
> * cp-tree.h (struct cxx_binding): New datatype;
This breaks bootstrap on s390 and s390x, the reason being a crash
in garbage collection. This is because an element of type struct
cxx_binding has its union discriminator is_local incorrectly set.
This in turn is apparently due to the fact that
cxx_binding *
binding_for_name (tree name, tree scope)
{
cxx_binding *result;
scope = ORIGINAL_NAMESPACE (scope);
result = cxx_scope_find_binding_for_name (scope, name);
if (result)
return result;
/* Not found, make a new one. */
result = cxx_binding_make ();
result->previous = IDENTIFIER_NAMESPACE_BINDINGS (name);
BINDING_TYPE (result) = NULL_TREE;
BINDING_VALUE (result) = NULL_TREE;
BINDING_SCOPE (result) = scope;
IDENTIFIER_NAMESPACE_BINDINGS (name) = result;
return result;
}
leaves is_local uninitialized.
Strangely enough, the patch from your mail has this hunk:
! cxx_binding *
! binding_for_name (tree name, tree scope)
{
! cxx_binding *result;
scope = ORIGINAL_NAMESPACE (scope);
! result = cxx_scope_find_binding_for_name (scope, name);
! if (result)
return result;
/* Not found, make a new one. */
! result = cxx_binding_make ();
! result->previous = IDENTIFIER_NAMESPACE_BINDINGS (name);
BINDING_TYPE (result) = NULL_TREE;
BINDING_VALUE (result) = NULL_TREE;
+ BINDING_SCOPE (result) = scope;
+ result->is_local = false;
+ result->value_is_inherited = false;
+ result->has_level = false;
+ IDENTIFIER_NAMESPACE_BINDINGS (name) = result;
return result;
}
Bad check-in?
Bye,
Ulrich
--
Dr. Ulrich Weigand
weigand at informatik dot uni-erlangen dot de