PR tree-optimization/70043
* tree-vect-loop.c (optimize_mask_stores): Move iterator to
previous statement if we see a debug statement.
* gfortran.dg/vect/pr70043.f90: New test.
From-SVN: r233934
+2016-03-03 Martin Liska <mliska@suse.cz>
+
+ PR tree-optimization/70043
+ * tree-vect-loop.c (optimize_mask_stores): Move iterator to
+ previous statement if we see a debug statement.
+
2016-03-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/55936
+2016-03-03 Ilya Enkovich <enkovich.gnu@gmail.com>
+
+ PR tree-optimization/70043
+ * gfortran.dg/vect/pr70043.f90: New test.
+
2016-03-03 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/specs/task1.ads: New test.
--- /dev/null
+! { dg-do compile }
+! { dg-additional-options "-Ofast -g" }
+! { dg-additional-options "-march=haswell" { target i?86-*-* x86_64-*-* } }
+
+subroutine fn1(a, b)
+ real(8), intent(in) :: b(100)
+ real(8), intent(inout) :: a(100)
+ real(8) c
+ do i=0,100
+ if( a(i) < 0.0 ) then
+ c = a(i) * b(i)
+ a(i) = a(i) - c / b(i)
+ endif
+ enddo
+end subroutine fn1
/* Skip debug statements. */
if (is_gimple_debug (gsi_stmt (gsi)))
- continue;
+ {
+ gsi_prev (&gsi);
+ continue;
+ }
stmt1 = gsi_stmt (gsi);
/* Do not consider statements writing to memory or having
volatile operand. */