diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2003-05-07 21:14:48 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2003-05-07 21:14:48 +0000 |
commit | 046e4e367e33c781229e0f33b936f8c64aa25dc1 (patch) | |
tree | 3614f193205349c343ee4e569d08b222253384a4 /gcc/stmt.c | |
parent | 9d70d418dbe366666be1ec6501d93cf2b661e1a0 (diff) | |
download | gcc-046e4e367e33c781229e0f33b936f8c64aa25dc1.zip gcc-046e4e367e33c781229e0f33b936f8c64aa25dc1.tar.gz gcc-046e4e367e33c781229e0f33b936f8c64aa25dc1.tar.bz2 |
stmt.c (force_label_rtx): New function, based on logic formerly found in expand_expr.
* stmt.c (force_label_rtx): New function, based on logic
formerly found in expand_expr.
* expr.h: Prototype it.
* expr.c (expand_expr <LABEL_DECL>): Use force_label_rtx if
appropriate.
* varasm.c (decode_addr_const <LABEL_DECL>): Use force_label_rtx.
* print-tree.c (debug_tree): Free the table after we're done
with it. Use putc.
treelang:
* Make-lang.in: Set -Wno-error for treelang/lex.o.
From-SVN: r66579
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r-- | gcc/stmt.c | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -510,6 +510,29 @@ label_rtx (label) return DECL_RTL (label); } +/* As above, but also put it on the forced-reference list of the + function that contains it. */ +rtx +force_label_rtx (label) + tree label; +{ + rtx ref = label_rtx (label); + tree function = decl_function_context (label); + struct function *p; + + if (!function) + abort (); + + if (function != current_function_decl + && function != inline_function_decl) + p = find_function_data (function); + else + p = cfun; + + p->expr->x_forced_labels = gen_rtx_EXPR_LIST (VOIDmode, ref, + p->expr->x_forced_labels); + return ref; +} /* Add an unconditional jump to LABEL as the next sequential instruction. */ |