PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / pr41646.c
blobf07b6ba19f435bfd1488becca0735dc7bc87ddb7
1 /* PR rtl-optimization/41646 */
3 struct A { unsigned long a; };
4 struct B { unsigned short b, c, d; };
5 struct B bar (unsigned long);
7 char *
8 foo (char *a, struct A *x)
10 struct B b = bar (x->a);
11 unsigned char c;
12 unsigned short d;
13 a[3] = ((unsigned char) (b.b % 10) + 48);
14 d = b.b / 10;
15 a[2] = ((unsigned char) (d % 10) + 48);
16 d = d / 10;
17 a[1] = ((unsigned char) (d % 10) + 48);
18 a[0] = ((unsigned char) ((d / 10) % 10) + 48);
19 a[4] = 46;
20 c = (unsigned char) b.c;
21 a[6] = (c % 10 + 48);
22 a[5] = ((c / 10) % 10 + 48);
23 a[7] = 46;
24 c = b.d;
25 a[9] = (c % 10 + 48);
26 a[8] = ((c / 10) % 10 + 48);
27 return a + 10;