2 20010910-1.c from the execute part of the gcc torture tests.
11 /* Test case contributed by Ingo Rohloff <rohloff@in.tum.de>.
12 Code distilled from Linux kernel. */
14 /* Compile this program with a gcc-2.95.2 using
15 "gcc -O2" and run it. The result will be that
16 rx_ring[1].next == 0 (it should be == 14)
18 ep.skbuff[4] == 5 (it should be 0)
21 #ifndef __SDCC_pdk14 // Lack of memory
22 extern void abort(void);
31 struct epic_rx_desc
*rx_ring
;
32 unsigned int rx_skbuff
[5];
35 static void epic_init_ring(struct epic_private
*ep
)
39 for (i
= 0; i
< 5; i
++)
41 ep
->rx_ring
[i
].next
= 10 + (i
+1)*2;
44 ep
->rx_ring
[i
-1].next
= 10;
47 static int check_rx_ring
[5] = { 12,14,16,18,10 };
51 testTortureExecute (void)
53 #ifndef __SDCC_pdk14 // Lack of memory
54 struct epic_private ep
;
55 struct epic_rx_desc rx_ring
[5];
69 if ( rx_ring
[i
].next
!= check_rx_ring
[i
] ) ASSERT(0);
70 if ( ep
.rx_skbuff
[i
] != 0 ) ASSERT(0);