jit: Fix Darwin bootstrap after r15-1699.
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / overlapping-buffers-pr113998.c
blob5c6352eb42f4970add6cebb43aed88351542eaa0
1 /* Verify we don't ICE on -Wanalyzer-overlapping-buffers on
2 execution paths where the size is constant zero, but the
3 optimizer didn't see that. */
5 typedef __SIZE_TYPE__ size_t;
7 extern char a[];
8 size_t n;
10 size_t __attribute__((noinline))
11 get_hidden_zero ()
13 return 0;
16 void
17 test_pr113998 ()
19 size_t n = get_hidden_zero ();
20 __builtin_strncpy (a, a, n); /* { dg-warning "overlapping buffers passed as arguments to" } */