diff mbox

r226516 - in /trunk/gcc: ChangeLog testsuite/Ch...

Message ID 55CD1812.3050207@redhat.com
State New
Headers show

Commit Message

Jeff Law Aug. 13, 2015, 10:20 p.m. UTC
On 08/05/2015 01:44 AM, Andreas Schwab wrote:
> FAIL: gcc.dg/pr66314.c (test for excess errors)
> Excess errors:
> /usr/local/gcc/gcc-20150805/gcc/testsuite/gcc.dg/pr66314.c:1:0: warning: -fsanitize=address and -fsanitize=kernel-address are not supported for this target
>
Fixing this is ever-so-slightly more complicated than just moving the 
test.  We need to clear all the sanitizers via -fno-sanitize=all before 
-fsanitize=kernel-address as -fsanitize=address conflicts with 
-fsanitize=kernel-address.

Committed to the trunk.

Sorry for the noise.

Jeff
diff mbox

Patch

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 4561032..2929fe4 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@ 
+2015-08-13  Jeff Law  <law@redhat.com>
+
+	* gcc.dg/pr66314.c: Moved from here to ..
+	* gcc.dg/asan/pr66314.c: Here.  Use -fno-sanitize=all
+	to clear all sanitizers before -fsanitize=kernel-address.
+
 2015-08-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
 	* gcc.target/aarch64/cinc_common_1.c: New test.
diff --git a/gcc/testsuite/gcc.dg/asan/pr66314.c b/gcc/testsuite/gcc.dg/asan/pr66314.c
new file mode 100644
index 0000000..3f6b12c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/asan/pr66314.c
@@ -0,0 +1,33 @@ 
+/* { dg-do compile } */
+/* { dg-options "-std=gnu89 -Os -fprofile-arcs -fno-sanitize=all -fsanitize=kernel-address" } */
+
+char *a;
+int d;
+
+static int
+fn1 (int b, int c)
+{
+  while (a)
+    if (*a)
+      return -126;
+  if (b)
+    return -12;
+  if (c == -12)
+    return c;
+}
+
+void
+fn2 (int b, int c)
+{
+  for (;;)
+    {
+      d = fn1 (b, c);
+      switch (d)
+        {
+        case -126:
+          continue;
+        default:
+          return;
+        }
+    }
+}
diff --git a/gcc/testsuite/gcc.dg/pr66314.c b/gcc/testsuite/gcc.dg/pr66314.c
deleted file mode 100644
index f74ab5b..0000000
--- a/gcc/testsuite/gcc.dg/pr66314.c
+++ /dev/null
@@ -1,33 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu89 -Os -fprofile-arcs -fsanitize=kernel-address" } */
-
-char *a;
-int d;
-
-static int
-fn1 (int b, int c)
-{
-  while (a)
-    if (*a)
-      return -126;
-  if (b)
-    return -12;
-  if (c == -12)
-    return c;
-}
-
-void
-fn2 (int b, int c)
-{
-  for (;;)
-    {
-      d = fn1 (b, c);
-      switch (d)
-        {
-        case -126:
-          continue;
-        default:
-          return;
-        }
-    }
-}