S/390: Allow immediates in loc expander
[official-gcc.git] / gcc / testsuite / gcc.dg / loop-3.c
blob7472ea1dfc6c876319e8757f02f7230f94214178
1 /* PR optimization/13985 */
2 /* Copied from gcc.c-torture/compile/930621-1.c */
4 /* { dg-do compile } */
5 /* { dg-options "-O3" } */
6 /* { dg-options "-O3 -mtune=i386" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
7 /* { dg-add-options stack_size } */
9 #if defined(STACK_SIZE) && (STACK_SIZE < 65536)
10 # define BYTEMEM_SIZE 10000L
11 #endif
13 #ifndef BYTEMEM_SIZE
14 # define BYTEMEM_SIZE 45000L
15 #endif
17 int bytestart[5000 + 1];
18 unsigned char modtext[400 + 1];
19 unsigned char bytemem[2][BYTEMEM_SIZE + 1];
21 long
22 modlookup (int l)
24 signed char c;
25 long j;
26 long k;
27 signed char w;
28 long p;
29 while (p != 0)
31 while ((k < bytestart[p + 2]) && (j <= l) && (modtext[j] == bytemem[w][k]))
33 k = k + 1;
34 j = j + 1;
36 if (k == bytestart[p + 2])
37 if (j > l)
38 c = 1;
39 else c = 4;
40 else if (j > l)
41 c = 3;
42 else if (modtext[j] < bytemem[w][k])
43 c = 0;
44 else c = 2;