1 /* Demonstrates the aliasing problem with the z80 port when loop
2 induction is turned on. Run_Index and Int_2_Loc get joined into
3 the same spill location.
5 Stripped down version of dhry.c
11 #define NOSTRUCTASSIGN 1
16 typedef int Enumeration;
18 typedef int One_Fifty;
19 typedef char Capital_Letter;
23 Enumeration Func_1 (Capital_Letter Ch_1_Par_Val, Capital_Letter Ch_2_Par_Val);
29 REG One_Fifty Int_2_Loc;
31 REG Capital_Letter Ch_Index;
34 REG int Number_Of_Runs;
36 /* Must be more than 13... */
40 for (Run_Index = 1; Run_Index <= Number_Of_Runs; ++Run_Index) {
45 /* Removing this section removes the problem. */
46 while (Int_1_Loc < Int_2_Loc)
48 Int_3_Loc = 5 * Int_1_Loc - Int_2_Loc;
52 /* Removing this section removes the problem. */
53 for (Ch_Index = 'A'; Ch_Index <= Ch_2_Glob; ++Ch_Index)
55 if (Enum_Loc == Func_1 (Ch_Index, 'C'))
57 Int_2_Loc = Run_Index;
61 /* Removing any one of the following lines removes the problem. */
62 Int_2_Loc = Int_2_Loc * Int_1_Loc;
63 Int_1_Loc = Int_2_Loc / Int_3_Loc;
64 Int_2_Loc = 7 * (Int_2_Loc - Int_3_Loc) - Int_1_Loc;
68 Enumeration Func_1 (Capital_Letter Ch_1_Par_Val, Capital_Letter Ch_2_Par_Val)