aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2020-09-26 00:05:53 +0200
committerJan Hubicka <jh@suse.cz>2020-09-26 00:05:53 +0200
commitf46f899b4fa41ec889540c4a663feaa814b73d24 (patch)
tree07d6316bda93798db31b842347d76ffdfdfc68f6 /gcc/opts.c
parent67a5c215940f4b21bac1aa489ce1f2fb3d52a53a (diff)
downloadgcc-f46f899b4fa41ec889540c4a663feaa814b73d24.zip
gcc-f46f899b4fa41ec889540c4a663feaa814b73d24.tar.gz
gcc-f46f899b4fa41ec889540c4a663feaa814b73d24.tar.bz2
Disable ipa-modref with live patching
2020-09-26 Jan Hubicka <hubicka@ucw.cz> * doc/invoke.texi: Add -fno-ipa-modref to flags disabled by -flive-patching. * opts.c (control_options_for_live_patching): Disable ipa-modref.
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index 3c4a0b5..3bda59a 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -792,6 +792,13 @@ control_options_for_live_patching (struct gcc_options *opts,
else
opts->x_flag_ipa_pure_const = 0;
+ if (opts_set->x_flag_ipa_modref && opts->x_flag_ipa_modref)
+ error_at (loc,
+ "%<-fipa-modref%> is incompatible with "
+ "%<-flive-patching=inline-only-static|inline-clone%>");
+ else
+ opts->x_flag_ipa_modref = 0;
+
/* FIXME: disable unreachable code removal. */
/* discovery of functions/variables with no address taken. */