PR c++/82069 - ICE with lambda in template
[official-gcc.git] / gcc / testsuite / gcc.dg / pr57662.c
blob253bf6891469f363acac0ec15d2f216de52cb36a
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" } */
4 struct intC
6 short x;
7 short y;
8 };
10 void Get(void);
12 int size_x;
14 struct
16 int *depot_table;
17 struct intC *ti;
18 int size;
19 } dummy;
21 static inline int
22 GetRotatedTileFromOffset (int *a, struct intC tidc)
24 if (!*a)
25 Get ();
26 switch (*a)
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);
37 return 0;
40 int
41 GetHangarNum (int *a, int i)
43 while (dummy.size)
44 if (GetRotatedTileFromOffset (a, dummy.ti[i]))
45 return *dummy.depot_table;
46 return 0;