Merge reload-branch up to revision 101000
[official-gcc.git] / gcc / testsuite / gcc.dg / sparc-dwarf2.c
blobd68cf620428d507d94b9bacbc4665eb5e68379aa
1 /* PR target/10114 */
2 /* Originator: James Troup <james@nocrew.org> */
3 /* { dg-do compile { target sparc-*-linux* } } */
4 /* { dg-options "-g -O1" } */
6 extern __inline double sqrt (double __x)
8 register double __r;
9 __asm ("fsqrtd %1,%0" : "=f" (__r) : "f" (__x));
10 return __r;
13 static double our_skew, max_update_skew;
15 static double Sqr(double x)
17 return x*x;
20 void REF_SetReference(double skew)
22 double previous_skew, new_skew;
23 double old_weight, new_weight, sum_weight;
24 double delta_freq1, delta_freq2;
25 double skew1, skew2;
27 previous_skew = our_skew;
28 skew1 = sqrt((Sqr(delta_freq1) * old_weight + Sqr(delta_freq2) * new_weight) / sum_weight);
29 skew2 = (previous_skew * old_weight + new_skew * new_weight) / sum_weight;
30 our_skew = skew1 + skew2;