2015-03-11 Marat Zakirov <m.zakirov@samsung.com>
* asan.c (instrument_derefs): Disable instrumentation on asan-globals=0.
* c-c++-common/asan/no-asan-check-glob.c: New test.
From-SVN: r221345
+2015-03-11 Marat Zakirov <m.zakirov@samsung.com>
+
+ * asan.c (instrument_derefs): Disable instrumentation on asan-globals=0.
+
2015-03-10 Jakub Jelinek <jakub@redhat.com>
PR target/65368
{
if (DECL_THREAD_LOCAL_P (inner))
return;
+ if (!ASAN_GLOBALS && is_global_var (inner))
+ return;
if (!TREE_STATIC (inner))
{
/* Automatic vars in the current function will be always
+2015-03-11 Marat Zakirov <m.zakirov@samsung.com>
+
+ * c-c++-common/asan/no-asan-check-glob.c: New test.
+
2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/65370
--- /dev/null
+/* { dg-options "--param asan-globals=0 -fdump-tree-asan" } */
+/* { dg-do compile } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } { "*" } } */
+
+extern int a;
+
+int foo ()
+{
+ return a;
+}
+
+/* { dg-final { scan-tree-dump-times "ASAN_CHECK" 0 "asan1" } } */
+/* { dg-final { cleanup-tree-dump "asan1" } } */