re PR middle-end/27889 (ICE on complex assignment in nested function)

PR 27889
        * tree-nested.c (create_tmp_var_for): Set DECL_COMPLEX_GIMPLE_REG_P
        if needed.

From-SVN: r115541
This commit is contained in:
Richard Henderson 2006-07-17 18:17:52 -07:00 committed by Richard Henderson
parent 4f5afe7d1a
commit 8bcbc00026
3 changed files with 20 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2006-07-17 Richard Henderson <rth@redhat.com>
PR 27889
* tree-nested.c (create_tmp_var_for): Set DECL_COMPLEX_GIMPLE_REG_P
if needed.
2006-07-17 Roger Sayle <roger@eyesopen.com>
Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>

View file

@ -0,0 +1,11 @@
void h(void (*)(void));
_Complex int g (void)
{
_Complex int x;
void f(void)
{
x = x + x;
}
h(f);
return x;
}

View file

@ -147,6 +147,9 @@ create_tmp_var_for (struct nesting_info *info, tree type, const char *prefix)
DECL_CONTEXT (tmp_var) = info->context;
TREE_CHAIN (tmp_var) = info->new_local_var_chain;
DECL_SEEN_IN_BIND_EXPR_P (tmp_var) = 1;
if (TREE_CODE (type) == COMPLEX_TYPE)
DECL_COMPLEX_GIMPLE_REG_P (tmp_var) = 1;
info->new_local_var_chain = tmp_var;
return tmp_var;