| 1 | ! Array intrinsics on REAL arrays: SUM, MAXVAL, MINVAL with type dispatch. |
| 2 | ! |
| 3 | ! CHECK: 6.0 |
| 4 | ! CHECK: 3.0 |
| 5 | ! CHECK: 1.0 |
| 6 | program test_real_array |
| 7 | implicit none |
| 8 | real(8), allocatable :: a(:) |
| 9 | allocate(a(3)) |
| 10 | a(1) = 1.0d0 |
| 11 | a(2) = 2.0d0 |
| 12 | a(3) = 3.0d0 |
| 13 | print *, sum(a) |
| 14 | print *, maxval(a) |
| 15 | print *, minval(a) |
| 16 | deallocate(a) |
| 17 | end program |
| 18 |