summaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2017-01-20 09:33:15 +0000
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2017-01-20 09:33:15 +0000
commit56a322fc358eac061a4f620da5b43cc9c9ec7370 (patch)
tree477d195f98346cad40e5117fdd59577d5df24bd7 /gcc/function.c
parentc2183d67a72b74bd6ff336de9a980782eb215e75 (diff)
downloadgcc-56a322fc358eac061a4f620da5b43cc9c9ec7370.tar.gz
Reload global options when strict aliasing is dropped (PR ipa/79043).
2017-01-20 Martin Liska <mliska@suse.cz> Backport from mainline 2017-01-13 Martin Liska <mliska@suse.cz> PR ipa/79043 * function.c (set_cfun): Add new argument force. * function.h (set_cfun): Likewise. * ipa-inline-transform.c (inline_call): Use the function when strict alising from is dropped for function we inline to. 2017-01-20 Martin Liska <mliska@suse.cz> Backport from mainline 2017-01-13 Martin Liska <mliska@suse.cz> PR ipa/79043 * gcc.c-torture/execute/pr79043.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@244691 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 401f8f90160..4f2791254e5 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -4800,9 +4800,9 @@ invoke_set_current_function_hook (tree fndecl)
/* cfun should never be set directly; use this function. */
void
-set_cfun (struct function *new_cfun)
+set_cfun (struct function *new_cfun, bool force)
{
- if (cfun != new_cfun)
+ if (cfun != new_cfun || force)
{
cfun = new_cfun;
invoke_set_current_function_hook (new_cfun ? new_cfun->decl : NULL_TREE);