Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/pr50604.c @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +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"; |