blob: 868b071afc5148b06554eaaafaaf7542a1e94f9c [file] [log] [blame]
/* PR tree-optimization/98721 */
/* { dg-do compile } */
/* { dg-options "-O2" } */
int
foo (int n)
{
if (n <= 0)
{
char vla[n]; /* { dg-message "source object 'vla' of size 0" } */
return __builtin_strlen (vla); /* { dg-warning "'__builtin_strlen' reading 1 or more bytes from a region of size 0" } */
}
return -1;
}