Am Tuesday 22 September 2009 23:20:12 schrieb Richard Henderson:
static_chain_on_stack will only ever be true for nested functions.
You should not need to apply this attribute to a nested function,
as such functions are never exported.
You could change handle_abi_attribute to reject this attribute
for nested functions by checking decl_function_context (*node) == NULL.
This doesn't seem to work. I added this:
if (decl_function_context (*node) == NULL)
{
error ("ms_hook_prologue is not compatible with nested functions");
}
in ix86_handle_abi_attribute, but when I try to compile a function with this
attribute I get this error:
test.c:2:1: internal compiler error: tree check: expected tree that
contains 'decl minimal' structure, have 'function_type' in
decl_function_context, at tree.c:7993
Please submit a full bug report,
with preprocessed source if appropriate.
See<http://gcc.gnu.org/bugs.html> for instructions.