1 /* PR tree-optimization/88693 */
2
3 __attribute__((noipa)) void
foo(char * p)4 foo (char *p)
5 {
6 if (__builtin_strlen (p) != 9)
7 __builtin_abort ();
8 }
9
10 __attribute__((noipa)) void
quux(char * p)11 quux (char *p)
12 {
13 int i;
14 for (i = 0; i < 100; i++)
15 if (p[i] != 'x')
16 __builtin_abort ();
17 }
18
19 __attribute__((noipa)) void
qux(void)20 qux (void)
21 {
22 char b[100];
23 __builtin_memset (b, 'x', sizeof (b));
24 quux (b);
25 }
26
27 __attribute__((noipa)) void
bar(void)28 bar (void)
29 {
30 static unsigned char u[9] = "abcdefghi";
31 char b[100];
32 __builtin_memcpy (b, u, sizeof (u));
33 b[sizeof (u)] = 0;
34 foo (b);
35 }
36
37 __attribute__((noipa)) void
baz(void)38 baz (void)
39 {
40 static unsigned char u[] = { 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r' };
41 char b[100];
42 __builtin_memcpy (b, u, sizeof (u));
43 b[sizeof (u)] = 0;
44 foo (b);
45 }
46
47 int
main()48 main ()
49 {
50 qux ();
51 bar ();
52 baz ();
53 return 0;
54 }
55