From: Martin Liska Date: Wed, 11 Oct 2017 12:29:13 +0000 (+0200) Subject: Revert last commit. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ed89e76a35f8dc067b747a57a143d2d74516afc4;p=gcc.git Revert last commit. From-SVN: r253638 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6b02c6216bb..2eecadbc981 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2017-10-11 Martin Liska + + Revert r253637: + + PR sanitizer/82484 + * sanopt.c (sanitize_rewrite_addressable_params): Do not handle + volatile arguments. + 2017-10-11 Martin Liska PR sanitizer/82484 diff --git a/gcc/sanopt.c b/gcc/sanopt.c index 019cf9fa81c..997bcfd3df7 100644 --- a/gcc/sanopt.c +++ b/gcc/sanopt.c @@ -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; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b6093d079ea..1f51a7217bc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2017-10-11 Martin Liska + + Revert r253637: + + PR sanitizer/82484 + * gcc.dg/asan/pr82484.c: New test. + 2017-10-11 Martin Liska 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 index f8051bd300c..00000000000 --- a/gcc/testsuite/gcc.dg/asan/pr82484.c +++ /dev/null @@ -1,5 +0,0 @@ -/* PR sanitizer/82484 */ -/* { dg-do compile } */ - -void foo(volatile int *ptr); -void a (volatile int b) { foo(&b); }