middle-end: Fix stalled swapped condition code value [PR115836]
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / memset-2.c
blobde7c973b1fddbe5ce4c88f68fcc982e982df38b2
1 /* { dg-additional-options "-fdump-analyzer-untracked" } */
3 #include "analyzer-decls.h"
5 struct S
7 int i;
8 };
10 /* memset of a static struct that never gets used. */
12 void
13 test_1 (void)
15 static struct S s; /* { dg-warning "track 's': no" } */
16 __builtin_memset (&s, 0, sizeof (s));
19 /* memset of a static struct that later gets used. */
21 void
22 test_2 (void)
24 static struct S s; /* { dg-warning "track 's': yes" } */
25 __builtin_memset (&s, 0, sizeof (s));
26 __analyzer_eval (s.i == 0); /* { dg-warning "TRUE" } */