PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / arm / pure-code / no-literal-pool.c
blob4b893fd32f722e6cd7dfde5c8542ab98327ba375
1 /* { dg-do compile } */
2 /* { dg-options "-mpure-code" } */
3 /* { dg-skip-if "" { *-*-* } { "-g" "-fpic" "-fPIC" } { "" } } */
5 float sf;
6 double df;
7 long long l;
8 static char *p = "Hello World";
10 float
11 testsf (float *p)
13 if (*p > 1.1234f)
14 return 2.1234f;
15 else
16 return 3.1234f;
19 double
20 testdf (double *p)
22 if (*p > 4.1234)
23 return 2.1234;
24 else
25 return 3.1234;
28 long long
29 testll (long long *p)
31 if (*p > 0x123456789ABCDEFll)
32 return 0x111111111ll;
33 else
34 return 0x222222222ll;
37 char *
38 testchar ()
40 return p + 4;
43 int
44 foo (int a, int b)
46 int i;
47 volatile int *labelref = &&label1;
49 if (a > b)
51 while (i < b)
53 a += *labelref;
54 i += 1;
56 goto *labelref;
58 else
59 b = b + 3;
61 a = a * b;
63 label1:
64 return a + b;
67 /* { dg-final { scan-assembler-not "\\.(float|l\\?double|\d?byte|short|int|long|quad|word)\\s+\[^.\]" } } */
68 /* { dg-final { scan-assembler "text,\"0x20000006\"" } } */