Revert last commit.
authorMartin Liska <mliska@suse.cz>
Wed, 11 Oct 2017 12:29:13 +0000 (14:29 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Wed, 11 Oct 2017 12:29:13 +0000 (12:29 +0000)
From-SVN: r253638

gcc/ChangeLog
gcc/sanopt.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/asan/pr82484.c [deleted file]

index 6b02c6216bb0842f317b921ca4f82013afc3d8cb..2eecadbc981bdfe9471fc92f8efcb87e21f84ed6 100644 (file)
@@ -1,3 +1,11 @@
+2017-10-11  Martin Liska  <mliska@suse.cz>
+
+       Revert r253637:
+
+       PR sanitizer/82484
+       * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
+       volatile arguments.
+
 2017-10-11  Martin Liska  <mliska@suse.cz>
 
        PR sanitizer/82484
index 019cf9fa81c0a4b37562d5139aac0cb9868fb24c..997bcfd3df71fc058524e5456caac1314066afea 100644 (file)
@@ -1140,9 +1140,7 @@ sanitize_rewrite_addressable_params (function *fun)
        arg; arg = DECL_CHAIN (arg))
     {
       tree type = TREE_TYPE (arg);
-      if (TREE_ADDRESSABLE (arg)
-         && !TREE_ADDRESSABLE (type)
-         && !TREE_THIS_VOLATILE (arg)
+      if (TREE_ADDRESSABLE (arg) && !TREE_ADDRESSABLE (type)
          && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST)
        {
          TREE_ADDRESSABLE (arg) = 0;
index b6093d079ea0c613ca2364815fca7ee26efc75e0..1f51a7217bc28c44300a7021dc58fc1a07ef38a5 100644 (file)
@@ -1,3 +1,10 @@
+2017-10-11  Martin Liska  <mliska@suse.cz>
+
+       Revert r253637:
+
+       PR sanitizer/82484
+       * gcc.dg/asan/pr82484.c: New test.
+
 2017-10-11  Martin Liska  <mliska@suse.cz>
 
        PR sanitizer/82484
diff --git a/gcc/testsuite/gcc.dg/asan/pr82484.c b/gcc/testsuite/gcc.dg/asan/pr82484.c
deleted file mode 100644 (file)
index f8051bd..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-/* PR sanitizer/82484 */
-/* { dg-do compile } */
-
-void foo(volatile int *ptr);
-void a (volatile int b) { foo(&b); }