aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2017-07-17 13:44:54 +0200
committerMartin Liska <marxin@gcc.gnu.org>2017-07-17 11:44:54 +0000
commit26c5b549cf954899e4c383e4f23e0b1c305449b2 (patch)
tree2d0b3bb9ecb59da52e87b8ff753f0b8fa951d255 /gcc/opts.c
parent6ff37519800c8826818929eccef30412bc530483 (diff)
downloadgcc-26c5b549cf954899e4c383e4f23e0b1c305449b2.zip
gcc-26c5b549cf954899e4c383e4f23e0b1c305449b2.tar.gz
gcc-26c5b549cf954899e4c383e4f23e0b1c305449b2.tar.bz2
Do not allow -fgnu-tm w/ -fsanitize={kernel-,}address (PR sanitizer/81302).
2017-07-17 Martin Liska <mliska@suse.cz> PR sanitizer/81302 * opts.c (finish_options): Do not allow -fgnu-tm w/ -fsanitize={kernel-,}address. Say sorry. From-SVN: r250271
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 0343d6a..3182bc9 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -1005,6 +1005,13 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
opts->x_flag_stack_reuse = SR_NONE;
}
+
+ if ((opts->x_flag_sanitize & SANITIZE_USER_ADDRESS) && opts->x_flag_tm)
+ sorry ("transactional memory is not supported with %<-fsanitize=address%>");
+
+ if ((opts->x_flag_sanitize & SANITIZE_KERNEL_ADDRESS) && opts->x_flag_tm)
+ sorry ("transactional memory is not supported with "
+ "%<-fsanitize=kernel-address%>");
}
#define LEFT_COLUMN 27