1 /* { dg-do compile } */
2 
3 struct struct1 { char a;};
4 struct struct2 { char a, b;};
5 struct struct3 { char a, b, c; };
6 struct struct4 { char a, b, c, d; };
7 struct struct5 { char a, b, c, d, e; };
8 struct struct6 { char a, b, c, d, e, f; };
9 struct struct7 { char a, b, c, d, e, f, g; };
10 struct struct8 { char a, b, c, d, e, f, g, h; };
11 struct struct9 { char a, b, c, d, e, f, g, h, i; };
12 struct struct10 { char a, b, c, d, e, f, g, h, i, j; };
13 struct struct11 { char a, b, c, d, e, f, g, h, i, j, k; };
14 struct struct12 { char a, b, c, d, e, f, g, h, i, j, k, l; };
15 struct struct13 { char a, b, c, d, e, f, g, h, i, j, k, l, m; };
16 struct struct14 { char a, b, c, d, e, f, g, h, i, j, k, l, m, n; };
17 struct struct15 { char a, b, c, d, e, f, g, h, i, j, k, l, m, n, o; };
18 struct struct16 { char a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p; };
19 
20 struct struct1 foo1 = {'1'};
21 struct struct2 foo2 = { 'a', 'b'};
22 struct struct3 foo3 = { 'A', 'B', 'C'};
23 struct struct4 foo4 = {'1', '2', '3', '4'};
24 struct struct5 foo5 = {'a', 'b', 'c', 'd', 'e'};
25 struct struct6 foo6 = {'A', 'B', 'C', 'D', 'E', 'F'};
26 struct struct7 foo7 = {'1', '2', '3', '4', '5', '6', '7'};
27 struct struct8 foo8 = {'1', '2', '3', '4', '5', '6', '7', '8'};
28 struct struct9 foo9 = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'};
29 struct struct10 foo10 = {
30   'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'};
31 struct struct11 foo11 = {
32   '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B'};
33 struct struct12 foo12 = {
34   'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L'};
35 struct struct13 foo13 = {
36   'a','b','c','d','e','f','g','h','i','j','k','l','m'};
37 struct struct14 foo14 = {
38   'a','b','c','d','e','f','g','h','i','j','k','l','m','n'};
39 struct struct15 foo15 = {
40   'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o'};
41 struct struct16 foo16 = {
42   'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p'};
43 
44 #define FUN(x) void fun##x ()\
45 { \
46   volatile struct struct##x var##x = foo##x; \
47 }
48 
49 FUN(1)
50 FUN(2)
51 FUN(3)
52 FUN(4)
53 FUN(5)
54 FUN(6)
55 FUN(7)
56 FUN(8)
57 FUN(9)
58 FUN(10)
59 FUN(11)
60 FUN(12)
61 FUN(13)
62 FUN(14)
63 FUN(15)
64 FUN(16)
65 
66 /* { dg-final { scan-assembler-times {ldr\s} 18 } } */
67 /* { dg-final { scan-assembler-times {ldrb} 4 } } */
68 /* { dg-final { scan-assembler-times {ldrh} 4 } } */
69 /* { dg-final { scan-assembler-times {ldp} 1 } } */
70