Merge -r 127928:132243 from trunk
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / 980506-1.c
blob619e18d05e46d167ebe94fe6f5d29241525c3273
1 /* The arrays are too large for the xstormy16 - won't fit in 16 bits. */
2 /* { dg-do assemble } */
3 /* { dg-require-effective-target size32plus } */
4 /* { dg-xfail-if "The array too big" { m6811-*-* m6812-*-* } { "*" } { "" } } /*
5 /* { dg-xfail-if "The array too big" { h8300-*-* } { "-mno-h" "-mn" } { "" } } */
7 unsigned char TIFFFax2DMode[20][256];
8 unsigned char TIFFFax2DNextState[20][256];
9 unsigned char TIFFFaxUncompAction[20][256];
10 unsigned char TIFFFaxUncompNextState[20][256];
11 unsigned char TIFFFax1DAction[230][256];
12 unsigned char TIFFFax1DNextState[230][256];
14 typedef struct tableentry {
15 unsigned short length;
16 unsigned short code;
17 short runlen;
18 } tableentry;
20 extern tableentry TIFFFaxWhiteCodes[];
21 extern tableentry TIFFFaxBlackCodes[];
23 static short sp_data, sp_bit;
25 static unsigned char
26 fetchByte (inbuf)
28 unsigned char **inbuf;
31 unsigned char byte = **inbuf;
32 (*inbuf)++;
33 return (byte);
36 static int
37 decode_white_run (inbuf)
39 unsigned char **inbuf;
42 short state = sp_bit;
43 short action;
44 int runlen = 0;
46 for (;;)
48 if (sp_bit == 0)
50 nextbyte:
51 sp_data = fetchByte (inbuf);
54 action = TIFFFax1DAction[state][sp_data];
55 state = TIFFFax1DNextState[state][sp_data];
56 if (action == 0 )
57 goto nextbyte;
58 if (action == 1 )
59 return (-1 );
60 if (action == 210 )
61 return (-3 );
62 sp_bit = state;
63 action = (TIFFFaxWhiteCodes[ action - 2 ].runlen) ;
64 runlen += action;
65 if (action < 64)
66 return (runlen);