OSDN Git Service

* config/i386/i386.c: Replace "mcpu" with "mtune".
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / 20020206-1.c
1 /* This code is from the beginning of combine_reloads in reload.c in
2    GCC 3.1-20020117, with simplifications.  It compiled incorrectly
3    for -O2 -fprefetch-loop-arrays for ix86 targets.  */
4
5 /* { dg-do run } */
6 /* { dg-options "-O2 -fprefetch-loop-arrays -w" } */
7 /* { dg-options "-O2 -fprefetch-loop-arrays -mtune=pentium3 -w" { target i?86-*-* } } */
8
9 struct reload
10 {
11   int first_member;
12   int out;
13   int final_member;
14 };
15
16 int n_reloads;
17 struct reload rld[10];
18
19 static int
20 combine_reloads ()
21 {
22   int i;
23   int output_reload = -1;
24   int secondary_out = -1;
25
26   for (i = 0; i < n_reloads; i++)
27     if (rld[i].out != 0)
28       {
29         if (output_reload >= 0)
30           return output_reload;
31         output_reload = i;
32       }
33   return output_reload;
34 }
35
36 int
37 main ()
38 {
39   n_reloads = 4;
40   rld[2].out = 2;
41   if (combine_reloads () != 2)
42     abort ();
43   exit (0);
44 }