1 /* PR 81908 - FAIL: gfortran.dg/alloc_comp_auto_array_2.f90 -O3 -g -m32
3 { dg-options "-O2 -Wall" } */
5 #define SIZE_MAX __SIZE_MAX__
6 typedef __SIZE_TYPE__
size_t;
8 void f0 (char *d
, const char *s
, size_t n
)
10 if (n
> 0 && n
<= SIZE_MAX
/ 2 - 1)
13 __builtin_memcpy (d
, s
, n
);
16 void f1 (char *d
, const char *s
, size_t n
)
18 if (n
> 0 && n
<= SIZE_MAX
/ 2)
21 __builtin_memcpy (d
, s
, n
); /* { dg-bogus "\\\[-Wstringop-overflow=]" } */
24 void f2 (char *d
, const char *s
, size_t n
)
26 if (n
> 0 && n
<= SIZE_MAX
/ 2 + 1)
29 __builtin_memcpy (d
, s
, n
);
32 void f3 (char *d
, const char *s
, size_t n
)
34 if (n
> 0 && n
<= SIZE_MAX
- 1)
37 __builtin_memcpy (d
, s
, n
); /* { dg-bogus "\\\[-Wstringop-overflow=]" } */
40 void f4 (char *d
, const char *s
, size_t n
)
42 if (n
> 0 && n
<= SIZE_MAX
)
45 __builtin_memcpy (d
, s
, n
);