gcc/testsuite/gfortran.dg/vect/pr115710.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-additional-options "-Ofast" } |
| 3 | ! { dg-require-effective-target vect_float } |
| 4 | ! { dg-require-effective-target vect_call_sqrtf } |
| 5 | |
| 6 | ! { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } |
| 7 | ! CABS expansion should allow for the vectorization to happen. |
| 8 | |
| 9 | subroutine foo(a,b,n) |
| 10 | complex(kind(1.0))::a(*) |
| 11 | real(kind(1.0))::b(*) |
| 12 | integer::i,n |
| 13 | |
| 14 | do i=1,n |
| 15 | b(i)=abs(a(i))**2 |
| 16 | end do |
| 17 | |
| 18 | end subroutine foo |