(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
arm/
pr70278.c
       1  /* { dg-do compile } */
       2  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv4t" } } */
       3  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
       4  /* { dg-require-effective-target arm_arch_v4t_ok } */
       5  /* { dg-require-effective-target arm_thumb1_ok } */
       6  /* { dg-options "-mthumb" } */
       7  /* { dg-add-options arm_arch_v4t } */
       8  /*
       9   * ====================================================
      10   * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
      11   *
      12   * Developed at SunPro, a Sun Microsystems, Inc. business.
      13   * Permission to use, copy, modify, and distribute this
      14   * software is freely granted, provided that this notice 
      15   * is preserved.
      16   * ====================================================
      17   */
      18  typedef union
      19  {
      20    double value;
      21    struct
      22    {
      23      unsigned int msw;
      24    } parts;
      25  } ieee_double_shape_type;
      26  double __ieee754_hypot(double x, double y)
      27  {
      28   double a=x,b=y,t1,t2,y1,y2,w;
      29   int j,k,ha,hb;
      30   do { ieee_double_shape_type gh_u; gh_u.value = (x); (ha) = gh_u.parts.msw; } while (0);;
      31   if(hb > ha) {a=y;b=x;j=ha; ha=hb;hb=j;} else {a=x;b=y;}
      32   if(ha > 0x5f300000) {
      33      do { ieee_double_shape_type sh_u; sh_u.value = (a); sh_u.parts.msw = (ha); (a) = sh_u.value; } while (0);;
      34   }
      35   w = a-b;
      36   if (w <= b)
      37   {
      38       t2 = a - t1;
      39       w = t1*y1-(w*(-w)-(t1*y2+t2*b));
      40   }
      41   if(k!=0) {
      42   } else return w;
      43  }