1 /* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */ 2 /* { dg-options " -O -fno-guess-branch-probability -fpeel-loops -freorder-blocks-and-partition -fschedule-insns2 -fsel-sched-pipelining -fselective-scheduling2 -ftree-pre" } */ 3 4 struct intC 5 { 6 short x; 7 short y; 8 }; 9 10 void Get(void); 11 12 int size_x; 13 14 struct 15 { 16 int *depot_table; 17 struct intC *ti; 18 int size; 19 } dummy; 20 21 static inline int GetRotatedTileFromOffset(int * a,struct intC tidc)22GetRotatedTileFromOffset (int *a, struct intC tidc) 23 { 24 if (!*a) 25 Get (); 26 switch (*a) 27 { 28 case 0: 29 return (tidc.y << size_x) + tidc.x; 30 case 1: 31 return tidc.y + (dummy.size - tidc.x) * size_x; 32 case 2: 33 return tidc.x + (dummy.size - tidc.y) * size_x; 34 case 3: 35 return (dummy.size - tidc.x); 36 } 37 return 0; 38 } 39 40 int GetHangarNum(int * a,int i)41GetHangarNum (int *a, int i) 42 { 43 while (dummy.size) 44 if (GetRotatedTileFromOffset (a, dummy.ti[i])) 45 return *dummy.depot_table; 46 return 0; 47 } 48