Debian Codegraph @

gcc/testsuite/gcc.target/arm/pure-code/no-literal-pool.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-mpure-code -mfp16-format=ieee" } */
3 /* { dg-skip-if "" { *-*-* } { "-g" "-fpic" "-fPIC" } { "" } } */
4
5 __fp16 hf;
6 float sf;
7 double df;
8 long long l;
9 static char *p = "Hello World";
10
11 __fp16
12 testsfp16 (__fp16 *p)
13 {
14 hf = 1.3;
15 *p += hf;
16 if (*p > 1.1234f)
17 return 2.1234f;
18 else
19 return 3.1234f;
20 }
21
22 float
23 testsf (float *p)
24 {
25 if (*p > 1.1234f)
26 return 2.1234f;
27 else
28 return 3.1234f;
29 }
30
31 double
32 testdf (double *p)
33 {
34 if (*p > 4.1234)
35 return 2.1234;
36 else
37 return 3.1234;
38 }
39
40 long long
41 testll (long long *p)
42 {
43 if (*p > 0x123456789ABCDEFll)
44 return 0x111111111ll;
45 else
46 return 0x222222222ll;
47 }
48
49 char *
50 testchar ()
51 {
52 return p + 4;
53 }
54
55 int
56 foo (int a, int b)
57 {
58 int i;
59 volatile int *labelref = &&label1;
60
61 if (a > b)
62 {
63 while (i < b)
64 {
65 a += *labelref;
66 i += 1;
67 }
68 goto *labelref;
69 }
70 else
71 b = b + 3;
72
73 a = a * b;
74
75 label1:
76 return a + b;
77 }
78
79 /* { dg-final { scan-assembler-not "\\.(float|l\\?double|\d?byte|short|int|long|quad|word)\\s+\[^.\]" } } */
80 /* { dg-final { scan-assembler "text,\"0x20000006\"" } } */