Hello Following patch disables -fgnu-tm with AddressSanitizer. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
Ready to be installed? Martin gcc/ChangeLog: 2017-07-04 Martin Liska <mli...@suse.cz> PR sanitizer/81302 * opts.c (finish_options): Do not allow -fgnu-tm w/ -fsanitize={kernel-,}address. --- gcc/opts.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/gcc/opts.c b/gcc/opts.c index 7460c2be1b6..c8affa4d704 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -1004,6 +1004,14 @@ 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) + error_at (loc, "transactional memory is not supported with " + "%<-fsanitize=address%>"); + + if ((opts->x_flag_sanitize & SANITIZE_KERNEL_ADDRESS) && opts->x_flag_tm) + error_at (loc, "transactional memory is not supported with " + "%<-fsanitize=kernel-address%>"); } #define LEFT_COLUMN 27