Kill walk_namespaces.
[official-gcc.git] / gcc / testsuite / gcc.target / arm / thumb2-slow-flash-data.c
blob089a72b67f3af570dbbed248a64a18b8b4e89ba4
1 /* The option -mslow-flash-data is just for performance tuning, it
2 doesn't totally disable the use of literal pools. But for below
3 simple cases, the use of literal pool should be replaced by
4 movw/movt or read-only constant pool. */
6 /* { dg-do compile } */
7 /* { dg-require-effective-target arm_cortex_m } */
8 /* { dg-require-effective-target arm_thumb2_ok } */
9 /* { dg-options "-O2 -mthumb -mslow-flash-data" } */
11 float sf;
12 double df;
13 long long l;
14 static char *p = "Hello World";
16 float
17 testsf (float *p)
19 if (*p > 1.1234f)
20 return 2.1234f;
21 else
22 return 3.1234f;
25 double
26 testdf (double *p)
28 if (*p > 4.1234)
29 return 2.1234;
30 else
31 return 3.1234;
34 long long
35 testll (long long *p)
37 if (*p > 0x123456789ABCDEFll)
38 return 0x111111111ll;
39 else
40 return 0x222222222ll;
43 char *
44 testchar ()
46 return p + 4;
49 int
50 foo (int a, int b)
52 int i;
53 volatile int *labelref = &&label1;
55 if (a > b)
57 while (i < b)
59 a += *labelref;
60 i += 1;
62 goto *labelref;
64 else
65 b = b + 3;
67 a = a * b;
69 label1:
70 return a + b;
73 /* { dg-final { scan-assembler-not "\\.(float|l\\?double|\d?byte|short|int|long|quad|word)\\s+\[^.\]" } } */