Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.c-torture / execute / 20000715-1.c
blob43af11480b41cd369919382315e2d4a4f4cd754f
1 void abort(void);
2 void exit(int);
4 void
5 test1(void)
7 int x = 3, y = 2;
9 if ((x < y ? x++ : y++) != 2)
10 abort ();
12 if (x != 3)
13 abort ();
15 if (y != 3)
16 abort ();
19 void
20 test2(void)
22 int x = 3, y = 2, z;
24 z = (x < y) ? x++ : y++;
25 if (z != 2)
26 abort ();
28 if (x != 3)
29 abort ();
31 if (y != 3)
32 abort ();
35 void
36 test3(void)
38 int x = 3, y = 2;
39 int xx = 3, yy = 2;
41 if ((xx < yy ? x++ : y++) != 2)
42 abort ();
44 if (x != 3)
45 abort ();
47 if (y != 3)
48 abort ();
51 int x, y;
53 static void
54 init_xy(void)
56 x = 3;
57 y = 2;
60 void
61 test4(void)
63 init_xy();
64 if ((x < y ? x++ : y++) != 2)
65 abort ();
67 if (x != 3)
68 abort ();
70 if (y != 3)
71 abort ();
74 void
75 test5(void)
77 int z;
79 init_xy();
80 z = (x < y) ? x++ : y++;
81 if (z != 2)
82 abort ();
84 if (x != 3)
85 abort ();
87 if (y != 3)
88 abort ();
91 void
92 test6(void)
94 int xx = 3, yy = 2;
95 int z;
97 init_xy();
98 z = (xx < y) ? x++ : y++;
99 if (z != 2)
100 abort ();
102 if (x != 3)
103 abort ();
105 if (y != 3)
106 abort ();
110 main(){
111 test1 ();
112 test2 ();
113 test3 ();
114 test4 ();
115 test5 ();
116 test6 ();
117 exit (0);