Skip several analyzer socket tests on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / pr104308.c
bloba3a0cbb731776b26e2ba9447baa7c39f80821a57
1 /* Verify that we have source locations for
2 -Wanalyzer-use-of-uninitialized-value warnings involving folded
3 memory ops. */
5 #include <string.h>
7 int test_memmove_within_uninit (void)
9 char s[5]; /* { dg-message "region created on stack here" } */
10 memmove(s, s + 1, 2); /* { dg-warning "use of uninitialized value" } */
11 return 0;
14 int test_memcpy_from_uninit (void)
16 char a1[5];
17 char a2[5]; /* { dg-message "region created on stack here" } */
18 return (memcpy(a1, a2, 5) == a1); /* { dg-warning "use of uninitialized value" } */