Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 229345 Details for
Bug 317187
[4.5] sys-devel/gcc-4.5.0 -foptimize-sibling-calls produces wrong code (seen with app-editors/emacs-23.1-r3)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
gcc45-PR43572-tailcall.patch
gcc45-PR43572-tailcall.patch (text/plain), 967 bytes, created by
Ryan Hill (RETIRED)
on 2010-04-27 06:07:16 UTC
(
hide
)
Description:
gcc45-PR43572-tailcall.patch
Filename:
MIME Type:
Creator:
Ryan Hill (RETIRED)
Created:
2010-04-27 06:07:16 UTC
Size:
967 bytes
patch
obsolete
>diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c >index 2ecca4a..a9bbc97 100644 >--- a/gcc/tree-tailcall.c >+++ b/gcc/tree-tailcall.c >@@ -375,6 +375,8 @@ find_tail_calls (basic_block bb, struct tailcall **ret) > tree m, a; > basic_block abb; > size_t idx; >+ tree var; >+ referenced_var_iterator rvi; > > if (!single_succ_p (bb)) > return; >@@ -462,6 +464,16 @@ find_tail_calls (basic_block bb, struct tailcall **ret) > tail_recursion = true; > } > >+ /* Make sure the tail invocation of this function does not refer >+ to local variables. */ >+ FOR_EACH_REFERENCED_VAR (var, rvi) >+ { >+ if (TREE_CODE (var) != PARM_DECL >+ && auto_var_in_fn_p (var, cfun->decl) >+ && ref_maybe_used_by_stmt_p (call, var)) >+ return; >+ } >+ > /* Now check the statements after the call. None of them has virtual > operands, so they may only depend on the call through its return > value. The return value should also be dependent on each of them,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 317187
:
229157
| 229345