summaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2017-01-13 12:56:54 +0000
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2017-01-13 12:56:54 +0000
commit67b5f619e75b3085374598d6f0626ec00d4c9de6 (patch)
treeee2c1eda6fcc5175948e6466e036b6bf04e1ee12 /gcc/function.c
parent785353b935ca320af8c01b628a4398a6aa4e3f42 (diff)
downloadgcc-67b5f619e75b3085374598d6f0626ec00d4c9de6.tar.gz
Reload global options when strict aliasing is dropped (PR ipa/79043).
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-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/trunk@244435 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 7fde96adbe3..f625489205b 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -4811,9 +4811,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);