1 /* PR middle-end/92936 - missing warning on a past-the-end store to a PHI
2 Test case derived from gcc/opts-common.c.
4 { dg-options "-O2 -Wall" } */
6 typedef __SIZE_TYPE__
size_t;
8 char* f (const void*, ...);
11 candidates_list_and_hint (const char *arg
, char **str
, const char *a
[])
16 for (i
= 0; a
[i
]; ++i
)
17 len
+= __builtin_strlen (a
[i
]) + 1;
19 char *p
= (char*)__builtin_malloc (len
);
22 for (i
= 0; a
[i
]; ++i
)
24 len
= __builtin_strlen (a
[i
]);
25 __builtin_memcpy (p
, a
[i
], len
);
30 p
[-1] = '\0'; // { dg-bogus "\\\[-Wstringop-overflow" }