PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr39240.c
blobde5e2ee70a40c062d0c78c0ccb729ef87ff4026b
1 /* PR target/39240 */
3 extern void abort (void);
5 __attribute__ ((noinline))
6 static int foo1 (int x)
8 return x;
11 __attribute__ ((noinline))
12 unsigned int bar1 (int x)
14 return foo1 (x + 6);
17 volatile unsigned long l1 = (unsigned int) -4;
19 __attribute__ ((noinline))
20 static short int foo2 (int x)
22 return x;
25 __attribute__ ((noinline))
26 unsigned short int bar2 (int x)
28 return foo2 (x + 6);
31 volatile unsigned long l2 = (unsigned short int) -4;
33 __attribute__ ((noinline))
34 static signed char foo3 (int x)
36 return x;
39 __attribute__ ((noinline))
40 unsigned char bar3 (int x)
42 return foo3 (x + 6);
45 volatile unsigned long l3 = (unsigned char) -4;
47 __attribute__ ((noinline))
48 static unsigned int foo4 (int x)
50 return x;
53 __attribute__ ((noinline))
54 int bar4 (int x)
56 return foo4 (x + 6);
59 volatile unsigned long l4 = (int) -4;
61 __attribute__ ((noinline))
62 static unsigned short int foo5 (int x)
64 return x;
67 __attribute__ ((noinline))
68 short int bar5 (int x)
70 return foo5 (x + 6);
73 volatile unsigned long l5 = (short int) -4;
75 __attribute__ ((noinline))
76 static unsigned char foo6 (int x)
78 return x;
81 __attribute__ ((noinline))
82 signed char bar6 (int x)
84 return foo6 (x + 6);
87 volatile unsigned long l6 = (signed char) -4;
89 int
90 main (void)
92 if (bar1 (-10) != l1)
93 abort ();
94 if (bar2 (-10) != l2)
95 abort ();
96 if (bar3 (-10) != l3)
97 abort ();
98 if (bar4 (-10) != l4)
99 abort ();
100 if (bar5 (-10) != l5)
101 abort ();
102 if (bar6 (-10) != l6)
103 abort ();
104 return 0;