annotate gcc/testsuite/gcc.dg/pr57662.c @ 111:04ced10e8804

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