Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/pr50604.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/50604 */ |
2 /* { dg-do compile } */ | |
3 /* { dg-options "-O2" } */ | |
4 | |
5 #include "strlenopt.h" | |
6 | |
7 typedef char T; | |
8 extern const T s[]; | |
9 | |
10 void | |
11 foo (T *x) | |
12 { | |
13 char *r = malloc (strlen (x)); | |
14 strcpy (r, s); | |
15 strcat (r, x); | |
16 strcat (r, "/"); | |
17 } | |
18 | |
19 const T s[] = "abcdefghijklmnopq"; |