view gcc/testsuite/gcc.dg/torture/pr71230.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do compile } */
/* { dg-additional-options "-ffast-math" } */

void metric_carttosphere(int *cctk_lsh, double txz, double tyz, double txx,
			 double tzz, double sint, double cosp, double cost,
			 double tyy, double sinp, double txy, double *grp,
			 double *grq, double *r)
{
  int i;
  for(i=0; i<cctk_lsh[0]*cctk_lsh[1]*cctk_lsh[2]; i++)
    {
      grq[i] = (cost*tyy*((sinp)*(sinp))*sint+
		2*cosp*cost*txy*sinp*sint-
		cost*tzz*sint+ 
		((cosp)*(cosp))*cost*txx*sint+
		2*((cost)*(cost))*tyz*sinp-
		tyz*sinp+
		2*cosp*((cost)*(cost))*txz-
		cosp*txz)*r[i];
      grp[i] = ((-txy*((sinp)*(sinp))+
		 (cosp*tyy-cosp*txx)*sinp+
		 ((cosp)*(cosp))*txy)*sint-
		cost*txz*sinp+cosp*cost*tyz);
    }
}