ee96d98c32719ab270acf50c1244474e33ccbeb1
[libfirm] / ir / be / test / fehler39.c
1 /* register allocator fails to resolve IMul Constraints correctly */
2
3 #ifdef __GNUC__
4 #define NO_INLINE __attribute__((noinline))
5 #else
6 #define NO_INLINE __declspec(noinline)
7 #endif
8
9 int LightSpriteCreate()
10 {
11         return 42;
12 }
13
14 void LightSpritePosition(int x, int y, int z)
15 {
16         (void) x;
17         (void) y;
18         (void) z;
19 }
20
21 typedef struct
22 {
23         short sX;
24         short sY;
25         int iLightID;
26 } EXPLOSIONTYPE;
27
28 static void GenerateExplosionFromExplosionPointer(EXPLOSIONTYPE* pExplosion)
29 {
30         short sX = pExplosion->sX;
31         short sY = pExplosion->sY;
32
33         if (pExplosion->iLightID = LightSpriteCreate())
34         {
35                 LightSpritePosition(pExplosion->iLightID, sX / 10, sY / 10);
36         }
37 }
38
39
40 void f(void)
41 {
42         GenerateExplosionFromExplosionPointer(0);
43 }
44
45
46 int main(void)
47 {
48         return 0;
49 }