diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-06-04 20:20:35 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-06-04 20:20:35 +0000 |
commit | f630ec0a70d880c4ac89d9af13621a5bd3fd6861 (patch) | |
tree | b6a449952428dd425e1dd64b2a2783a7d8f2379f /gcc/sibcall.c | |
parent | 231c52be92de1c8fbf6e9faa9f2f4906f3f0ddbf (diff) | |
download | gcc-f630ec0a70d880c4ac89d9af13621a5bd3fd6861.tar.gz |
* sibcall.c (optimize_sibling_and_tail_recursive_call): Suppress
optimization if current_function_calls_setjmp.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42880 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sibcall.c')
-rw-r--r-- | gcc/sibcall.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/sibcall.c b/gcc/sibcall.c index 53ce4317c96..eefe0809eec 100644 --- a/gcc/sibcall.c +++ b/gcc/sibcall.c @@ -617,11 +617,15 @@ optimize_sibling_and_tail_recursive_calls () /* See if there are any reasons we can't perform either sibling or tail call optimizations. We must be careful with stack slots - which are live at potential optimization sites. ?!? The first + which are live at potential optimization sites. ??? The first test is overly conservative and should be replaced. */ if (frame_offset /* Can't take address of local var if used by recursive call. */ || current_function_uses_addressof + /* Any function that calls setjmp might have longjmp called from + any called function. ??? We really should represent this + properly in the CFG so that this needn't be special cased. */ + || current_function_calls_setjmp /* Can't if more than one successor or single successor is not exit block. These two tests prevent tail call optimization in the presense of active exception handlers. */ |