1 /* { dg-do compile } */
2 /* { dg-require-effective-target arm_thumb2_ok } */
3 /* { dg-additional-options "-mthumb" } */
4 /* { dg-timeout-factor 4.0 } */
5
6 int printf(const char *, ...);
7
8 #define HW0 printf("Hello World!\n");
9 #define HW1 HW0 HW0 HW0 HW0 HW0 HW0 HW0 HW0 HW0 HW0
10 #define HW2 HW1 HW1 HW1 HW1 HW1 HW1 HW1 HW1 HW1 HW1
11 #define HW3 HW2 HW2 HW2 HW2 HW2 HW2 HW2 HW2 HW2 HW2
12 #define HW4 HW3 HW3 HW3 HW3 HW3 HW3 HW3 HW3 HW3 HW3
13 #define HW5 HW4 HW4 HW4 HW4 HW4 HW4 HW4 HW4 HW4 HW4
14 #define HW6 HW5 HW5
15
16 __attribute__((noinline,noclone)) void f1 (int a)
17 {
18 if (a) { HW0 }
19 }
20
21 __attribute__((noinline,noclone)) void f2 (int a)
22 {
23 if (a) { HW3 }
24 }
25
26
27 __attribute__((noinline,noclone)) void f3 (int a)
28 {
29 if (a) { HW6 }
30 }
31
32 __attribute__((noinline,noclone)) void f4 (int a)
33 {
34 if (a == 1) { HW0 }
35 }
36
37 __attribute__((noinline,noclone)) void f5 (int a)
38 {
39 if (a == 1) { HW3 }
40 }
41
42
43 __attribute__((noinline,noclone)) void f6 (int a)
44 {
45 if (a == 1) { HW6 }
46 }
47
48
49 int main(void)
50 {
51 f1(0);
52 f2(0);
53 f3(0);
54 f4(0);
55 f5(0);
56 f6(0);
57 return 0;
58 }
59
60
61 /* { dg-final { scan-assembler-times "beq\\t.L\[0-9\]" 2 } } */
62 /* { dg-final { scan-assembler-times "beq\\t.Lbcond\[0-9\]" 1 } } */
63 /* { dg-final { scan-assembler-times "bne\\t.L\[0-9\]" 2 } } */
64 /* { dg-final { scan-assembler-times "bne\\t.Lbcond\[0-9\]" 1 } } */