Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.dg / Warray-bounds-25.c
blob37fb9ccf4df841ade8b1647e6237886bb8880e9b
1 /* PR tree-optimization/83446 - Bootstrap failed on i686
2 { dg-do compile }
3 { dg-options "-O2 -Warray-bounds" } */
5 char a[4];
7 void f0i (void *d, int n)
9 if (n < 0) n = 0;
11 __builtin_memcpy (d, a + sizeof a - n, n);
14 void f0L (void *d, long n)
16 if (n < 0) n = 0;
18 __builtin_memcpy (d, a + sizeof a - n, n);
21 void f0u (void *d, unsigned n)
23 if (n < 0) n = 1;
25 __builtin_memcpy (d, a + sizeof a - n, n); /* { dg-bogus "\\\[-Warray-bounds" } */
28 void f1lu (void *d, unsigned long n)
30 if (n < 1) n = 1;
32 __builtin_memcpy (d, a + sizeof a - n, n); /* { dg-bogus "\\\[-Warray-bounds" } */