OSDN Git Service

Squash commit of EH in gimple
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / tree-ssa / pr21584-2.C
1 extern char *strcpy (char *__restrict __dest, __const char *__restrict __src);
2
3 extern char *foo (void);
4 extern void *malloc(__SIZE_TYPE__) __attribute__((malloc));
5
6 char v[100];
7
8 void baz()
9 {
10   char *vec;
11   char buf[512];
12
13   char *p = buf;
14   while (v[(*p)])
15     p++;
16
17   if (*p != '#' && (p = foo()) != 0) {
18     strcpy ((char*)malloc(10), p);
19   }
20 }
21
22