gcc/testsuite/gfortran.dg/pr36006-1.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! |
| 3 | subroutine test4 |
| 4 | integer, parameter :: wp = 4 |
| 5 | complex(wp), parameter :: i = (0._wp, 1._wp) |
| 6 | complex(wp) :: c(12) |
| 7 | integer :: m, N |
| 8 | |
| 9 | N = 12 |
| 10 | c = (/(exp(i*m),m=1,N)/) |
| 11 | print *, c(1) |
| 12 | end |
| 13 | |
| 14 | subroutine test8 |
| 15 | integer, parameter :: wp = 8 |
| 16 | complex(wp), parameter :: i = (0._wp, 1._wp) |
| 17 | complex(wp) :: c(12) |
| 18 | integer :: m, N |
| 19 | |
| 20 | N = 12 |
| 21 | c = (/(exp(i*m),m=1,N)/) |
| 22 | print *, c(1) |
| 23 | end |