Commit 866c72a8 by Martin Liska Committed by Martin Liska

Do not disable aggressive loop opts for

	PR sanitizer/77966
	* opts.c (finish_options): Skip conditionally.
	PR sanitizer/77966
	* c-c++-common/ubsan/unreachable-3.c: New test.

From-SVN: r241463
parent af460fd7
2016-10-24 Martin Liska <mliska@suse.cz>
PR sanitizer/77966
* opts.c (finish_options): Skip conditionally.
2016-10-23 Martin Sebor <msebor@redhat.com>
PR target/77837
......
......@@ -973,7 +973,7 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
opts->x_flag_delete_null_pointer_checks = 0;
/* Aggressive compiler optimizations may cause false negatives. */
if (opts->x_flag_sanitize)
if (opts->x_flag_sanitize & ~(SANITIZE_LEAK | SANITIZE_UNREACHABLE))
{
opts->x_flag_aggressive_loop_optimizations = 0;
opts->x_flag_strict_overflow = 0;
......
2016-10-24 Martin Liska <mliska@suse.cz>
PR sanitizer/77966
* c-c++-common/ubsan/unreachable-3.c: New test.
2016-10-23 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77763
......
/* { dg-do compile } */
/* { dg-options "-fsanitize=unreachable -O2 -fno-reorder-blocks -fsanitize-coverage=trace-pc -fdump-tree-optimized" } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
extern unsigned int ioread32(void *);
struct vnic_wq_ctrl {
unsigned int error_status;
};
struct snic {
unsigned int wq_count;
struct vnic_wq_ctrl *wq[1];
int wq_lock[1];
};
void snic_log_q_error(struct snic *snic)
{
unsigned int i;
for (i = 0; i < snic->wq_count; i++)
ioread32(&snic->wq[i]->error_status);
}
/* { dg-final { scan-tree-dump "__builtin___ubsan_handle_builtin_unreachable" "optimized" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment