aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr110603.c
blob: afcc1a522c234b2f909cc94678ba79cfa19e7a28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* PR tree-optimization/110603 */

typedef __SIZE_TYPE__ size_t;
void *memcpy (void *, const void *, size_t);
int snprintf (char *restrict, size_t, const char *restrict, ...);
extern char a[2];
void bar (void);

void
foo (void)
{
  memcpy (a, "12", sizeof (a));
  int b = snprintf (0, 0, "%s", a);
  if (b <= 3)
    bar ();
}