On 5/12/20 9:23 PM, Jakub Jelinek wrote:
Hi!

On Tue, May 12, 2020 at 12:06:25PM -0700, H.J. Lu wrote:
Excess errors:
cc1: error: '-fsanitize=address' is incompatible with
'-fsanitize=kernel-address'

asan.exp adds -fsanitize=address which is incompatible with 
-fsanitize=kernel-address,
so we need to disable it first.

Sorry for the breakage, I added this test late after I made tests.
There's a simplification where the test-case failes also with 
-fsanitize=address -O2.

Martin


Tested on x86_64-linux -m32/-m64, committed to trunk as obvious.

2020-05-12  Jakub Jelinek  <ja...@redhat.com>

        PR sanitizer/95051
        * gcc.dg/asan/pr95051.c: Add -fno-sanitize=all to dg-options.

--- gcc/testsuite/gcc.dg/asan/pr95051.c.jj      2020-05-12 11:25:46.209148953 
+0200
+++ gcc/testsuite/gcc.dg/asan/pr95051.c 2020-05-12 21:12:28.170118274 +0200
@@ -1,6 +1,6 @@
  /* PR sanitizer/95051 */
  /* { dg-do compile } */
-/* { dg-options "-fsanitize=kernel-address --param=asan-stack=1 -O2" } */
+/* { dg-options "-fno-sanitize=all -fsanitize=kernel-address --param=asan-stack=1 
-O2" } */
struct a {
    struct {


        Jakub


>From 678e6b5c127307f29f0ce883497d4e7af399399c Mon Sep 17 00:00:00 2001
From: Martin Liska <mli...@suse.cz>
Date: Tue, 12 May 2020 22:02:24 +0200
Subject: [PATCH] Simplify test-case options.

gcc/testsuite/ChangeLog:

2020-05-12  Martin Liska  <mli...@suse.cz>

	PR sanitizer/95051
	* gcc.dg/asan/pr95051.c: Simplify options as -fsanitize=address
	and -O2 were enough to trigger the original ICE.
---
 gcc/testsuite/gcc.dg/asan/pr95051.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/asan/pr95051.c b/gcc/testsuite/gcc.dg/asan/pr95051.c
index caa5e667209..e32c04599a8 100644
--- a/gcc/testsuite/gcc.dg/asan/pr95051.c
+++ b/gcc/testsuite/gcc.dg/asan/pr95051.c
@@ -1,6 +1,6 @@
 /* PR sanitizer/95051 */
 /* { dg-do compile } */
-/* { dg-options "-fno-sanitize=all -fsanitize=kernel-address --param=asan-stack=1 -O2" } */
+/* { dg-options "-O2" } */
 
 struct a {
   struct {
-- 
2.26.2

Reply via email to