middle-end: Fix stalled swapped condition code value [PR115836]
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / out-of-bounds-pr110387.c
blobb4454805eb5865ef2f192fe9ab94573cd60af34c
1 char a, b, c, d;
2 long x;
4 void
5 _S_copy (long __n)
7 __builtin_memcpy (&a, &d, __n); /* { dg-prune-output "-Wanalyzer-out-of-bounds" } */
8 /* This only warns on some targets; the purpose of the test is to verify that
9 we don't ICE. */
12 void
13 _M_construct ()
15 x = &c - &b; /* { dg-warning "undefined behavior when subtracting pointers" } */
16 unsigned long __dnew = x;
17 if (__dnew > 1)
18 _S_copy (&c - &b); /* { dg-warning "undefined behavior when subtracting pointers" } */