OSDN Git Service

* config/i386/i386.md (UNSPEC_VSIBADDR): New.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / pr48156.c
1 /* PR rtl-optimization/48156 */
2 /* { dg-do run } */
3 /* { dg-options "-O -fcrossjumping --param min-crossjump-insns=1" } */
4
5 extern void abort (void);
6
7 static int __attribute__ ((noinline, noclone))
8 equals (int s1, int s2)
9 {
10   return s1 == s2;
11 }
12
13 static int __attribute__ ((noinline, noclone))
14 bar (void)
15 {
16   return 1;
17 }
18
19 static void __attribute__ ((noinline, noclone))
20 baz (int f, int j)
21 {
22   if (f != 4 || j != 2)
23     abort ();
24 }
25
26 void
27 foo (int x)
28 {
29   int i = 0, j = bar ();
30
31   if (x == 1)
32     i = 2;
33
34   if (j && equals (i, j))
35     baz (8, i);
36   else
37     baz (4, i);
38 }
39
40 int
41 main ()
42 {
43   foo (1);
44   return 0;
45 }