* testsuite/libgomp.fortran/vla7.f90: Add -w to options.
[official-gcc.git] / gcc / testsuite / gcc.dg / 20040305-1.c
blobd2c4da4296f95c041a5e473c756c0f7f7403bb30
2 /* The testcase failed due to corrupted alias information.
3 During the crossjump analyzing step the mem alias info of the
4 st instructions are merged and get copied during basic block
5 reordering which leads to an insn with wrong alias info.
6 The scheduler afterwards exchanges the mvc and st instructions
7 not recognizing the anti dependence. */
8 /* { dg-do run { target s390-*-* } } */
9 /* { dg-options "-O3 -mtune=z990 -fno-inline" } */
11 extern void exit (int);
12 extern void abort (void);
14 int f;
15 int g;
16 int h;
18 int* x = &f;
19 int* p1 = &g;
20 int* p2 = &h;
22 int
23 foo(void)
26 if (*x == 0)
28 x = p1; /* mvc - memory to memory */
29 p1 = (int*)0; /* st - register to memory */
30 return 1;
32 if (*x == 5)
34 f = 1;
35 g = 2;
37 p2 = (int*)0; /* st */
38 return 1;
42 int
43 main (int argc, char** argv)
45 foo ();
47 /* If the scheduler has exchanged the mvc and st instructions,
48 x is 0. The expected result is &g. */
49 if (x == &g)
50 exit (0);
51 else
52 abort ();