Small ChangeLog tweak.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / mips-hilo-2.c
blob78f7710d67bed114ea291ddfaac41f7aa57d6ba0
1 /* Due to a reload inheritance bug, the asm statement in f() would be passed
2 the low part of u.ll on little-endian 32-bit targets. */
3 /* { dg-do run { target mips*-*-* } } */
5 extern void abort (void);
6 extern void exit (int);
8 #if __mips_isa_rev <= 5
9 unsigned int g;
11 unsigned __attribute__ ((nomips16)) long long f (unsigned int x)
13 union { unsigned long long ll; unsigned int parts[2]; } u;
15 u.ll = ((unsigned long long) x * x);
16 asm ("mflo\t%0" : "=r" (g) : "l" (u.parts[1]));
17 return u.ll;
19 #endif
21 int __attribute__ ((nomips16)) main ()
23 #if __mips_isa_rev <= 5
24 union { unsigned long long ll; unsigned int parts[2]; } u;
26 u.ll = f (0x12345678);
27 if (g != u.parts[1])
28 abort ();
29 #endif
30 exit (0);