annotate gcc/testsuite/gcc.dg/pr71558.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* PR tree-optimization/71588 */
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 /* strcpy must not be pure, but make sure we don't ICE even when
kono
parents:
diff changeset
4 it is declared incorrectly. */
kono
parents:
diff changeset
5 char *strcpy (char *, const char *) __attribute__ ((__pure__));
kono
parents:
diff changeset
6 __SIZE_TYPE__ strlen (const char *);
kono
parents:
diff changeset
7 void *malloc (__SIZE_TYPE__);
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 char a[20];
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 char *
kono
parents:
diff changeset
12 foo (void)
kono
parents:
diff changeset
13 {
kono
parents:
diff changeset
14 __SIZE_TYPE__ b = strlen (a);
kono
parents:
diff changeset
15 char *c = malloc (b);
kono
parents:
diff changeset
16 return strcpy (c, a);
kono
parents:
diff changeset
17 }