aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/tree-ssa/pr21584-2.C
blob: 6246e8d4cbb364cd442bb8e8205805feb534575c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
extern char *strcpy (char *__restrict __dest, __const char *__restrict __src);

extern char *foo (void);
extern void *malloc(__SIZE_TYPE__) __attribute__((malloc));

char v[100];

void baz()
{
  char *vec;
  char buf[512];

  char *p = buf;
  while (v[(*p)])
    p++;

  if (*p != '#' && (p = foo()) != 0) {
    strcpy ((char*)malloc(10), p);
  }
}