view gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-14.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-options "-fdump-tree-sanopt" } */
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */

void
foo (char *p)
{
  __builtin_memcpy (p, "abc", 2);
  /* This doesn't generate a __builtin___asan_report_store1 because we
     verified p[0] through p[2] is writable in previous memcpy call.  */
  p[0] = 'd';
}

/* { dg-final { scan-tree-dump-not "__builtin___asan_report_store1" "sanopt" } } */