gcc/testsuite/gfortran.dg/vect/pr70043.f90
raw| 1 | ! PR tree-optimization/70043 |
| 2 | ! { dg-do compile } |
| 3 | ! { dg-additional-options "-Ofast -g" } |
| 4 | ! { dg-additional-options "-march=haswell" { target i?86-*-* x86_64-*-* } } |
| 5 | |
| 6 | subroutine fn1(a, b) |
| 7 | real(8), intent(in) :: b(100) |
| 8 | real(8), intent(inout) :: a(100) |
| 9 | real(8) c |
| 10 | do i=1,100 |
| 11 | if( a(i) < 0.0 ) then |
| 12 | c = a(i) * b(i) |
| 13 | a(i) = a(i) - c / b(i) |
| 14 | endif |
| 15 | enddo |
| 16 | end subroutine fn1 |