On darwin, system headers are fortified by default and that defeats the
analyzer's warnings on memcpy() calls. Turn this off for testing.
gcc/testsuite/ChangeLog:
* gcc.dg/plugin/taint-CVE-2011-0521-5-fixed.c: Use
_FORTIFY_SOURCE=0 on darwin.
* gcc.dg/plugin/taint-CVE-2011-0521-5.c: Likewise.
* gcc.dg/plugin/taint-CVE-2011-0521-6.c: Likewise.
/* { dg-options "-fanalyzer -fanalyzer-checker=taint --param=analyzer-max-svalue-depth=25" } */
/* { dg-require-effective-target analyzer } */
+/* On darwin, system headers are fortified, which defeats the analysis. Turn it off. */
+/* { dg-additional-options "-D_FORTIFY_SOURCE=0" { target *-*-darwin* } } */
+
/* See notes in this header. */
#include "taint-CVE-2011-0521.h"
/* { dg-options "-fanalyzer -fanalyzer-checker=taint --param=analyzer-max-svalue-depth=25" } */
/* { dg-require-effective-target analyzer } */
+/* On darwin, system headers are fortified, which defeats the analysis. Turn it off. */
+/* { dg-additional-options "-D_FORTIFY_SOURCE=0" { target *-*-darwin* } } */
+
/* See notes in this header. */
#include "taint-CVE-2011-0521.h"
/* { dg-options "-fanalyzer -fanalyzer-checker=taint --param=analyzer-max-svalue-depth=25" } */
/* { dg-require-effective-target analyzer } */
+/* On darwin, system headers are fortified, which defeats the analysis. Turn it off. */
+/* { dg-additional-options "-D_FORTIFY_SOURCE=0" { target *-*-darwin* } } */
+
/* See notes in this header. */
#include "taint-CVE-2011-0521.h"