diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-07-31 22:11:29 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:02:28 -0700 |
| commit | 8f776eb5f8939ccbe9e9824d6e57b0fd04c18a5a (patch) | |
| tree | 878809f38fd14de72292e79e3053051127354295 /expression.c | |
| parent | 2c8642d050665a996ccbbc334fd0cb1a92350c72 (diff) | |
| download | sparse-dev-8f776eb5f8939ccbe9e9824d6e57b0fd04c18a5a.tar.gz | |
Keep track of computed target label lists per-function.
Associate them with each computed goto, and copy them properly
when inlining.
Diffstat (limited to 'expression.c')
| -rw-r--r-- | expression.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/expression.c b/expression.c index 98c64ec6..ccb1ee00 100644 --- a/expression.c +++ b/expression.c @@ -449,7 +449,12 @@ static struct token *unary_expression(struct token *token, struct expression **t if (match_op(token, SPECIAL_LOGICAL_AND) && token_type(token->next) == TOKEN_IDENT) { struct expression *label = alloc_expression(token->pos, EXPR_LABEL); - label->label_symbol = label_symbol(token->next); + struct symbol *sym = label_symbol(token->next); + if (!(sym->ctype.modifiers & MOD_ADDRESSABLE)) { + sym->ctype.modifiers |= MOD_ADDRESSABLE; + add_symbol(&function_computed_target_list, sym); + } + label->label_symbol = sym; *tree = label; return token->next->next; } |
