Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / pr78973.c
blob7dd67cef330c9aa246992a9c0e84a411ea74d860
1 /* PR c/78973 - warning: ‘memcpy’: specified size exceeds maximum object size
3 Test case for what was initially thought to be a false positive but after
4 deeper investigation turned out to be a true positive.
6 { dg-do compile }
7 { dg-options "-O2 -Wall" } */
9 static void f (void *p, int n)
11 if (n <= 4)
12 __builtin_memset (p, 0, n); /* { dg-warning "exceeds maximum object size" "pr79073" { xfail { int16 && { ! msp430_large } } } } */
15 void g (void *d, unsigned n)
17 if (n < 5)
18 n = 5;
19 f (d, n);