2014-04-30 Richard Biener <rguenther@suse.de>
PR tree-optimization/48329
* gfortran.dg/vect/pr48329.f90: New testcase.
From-SVN: r209930
+2014-04-30 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/48329
+ * gfortran.dg/vect/pr48329.f90: New testcase.
+
2014-04-30 Marek Polacek <polacek@redhat.com>
* c-c++-common/ubsan/div-by-zero-5.c: Fix formatting.
--- /dev/null
+! { dg-do compile }
+! { dg-require-effective-target vect_float }
+! { dg-require-effective-target vect_intfloat_cvt }
+! { dg-additional-options "-ffast-math" }
+
+program calcpi
+
+ implicit none
+ real(kind=4):: h,x,sum,pi
+ integer:: n,i
+ real(kind=4):: f
+
+ f(x) = 4.0/(1.0+x**2)
+
+ n = 2100000000
+
+ h= 1.0 / n
+ sum = 0.0
+ DO i=1, n
+ x = h * (i-0.5)
+ sum = sum + f(x)
+ END DO
+ pi = h * sum
+ write(*,*) 'Pi=',pi
+
+end program calcpi
+
+! { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } }
+! { dg-final { cleanup-tree-dump "vect" } }