blob: 33a648e108c751a5a9acb0c3d0f45776dad93305 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
/* PR tree-optimization/71588 */
/* strcpy must not be pure, but make sure we don't ICE even when
it is declared incorrectly. */
char *strcpy (char *, const char *) __attribute__ ((__pure__));
__SIZE_TYPE__ strlen (const char *);
void *malloc (__SIZE_TYPE__);
char a[20];
char *
foo (void)
{
__SIZE_TYPE__ b = strlen (a);
char *c = malloc (b);
return strcpy (c, a);
}
|