Mercurial > hg > CbC > CbC_gcc
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 |
rev | line source |
---|---|
111 | 1 /* PR tree-optimization/71588 */ |
2 | |
3 /* strcpy must not be pure, but make sure we don't ICE even when | |
4 it is declared incorrectly. */ | |
5 char *strcpy (char *, const char *) __attribute__ ((__pure__)); | |
6 __SIZE_TYPE__ strlen (const char *); | |
7 void *malloc (__SIZE_TYPE__); | |
8 | |
9 char a[20]; | |
10 | |
11 char * | |
12 foo (void) | |
13 { | |
14 __SIZE_TYPE__ b = strlen (a); | |
15 char *c = malloc (b); | |
16 return strcpy (c, a); | |
17 } |