gcc/testsuite/gfortran.dg/allocated_2.f90
raw| 1 | ! { dg-do compile } |
| 2 | program foo |
| 3 | |
| 4 | implicit none |
| 5 | |
| 6 | integer, allocatable :: x |
| 7 | integer, allocatable :: a(:) |
| 8 | |
| 9 | logical a1, a2 |
| 10 | |
| 11 | a1 = allocated(scalar=a) ! { dg-error "Scalar entity required" } |
| 12 | a2 = allocated(array=x) ! { dg-error "Array entity required" } |
| 13 | a1 = allocated(scalar=x, array=a) ! { dg-error "Too many arguments" } |
| 14 | a1 = allocated(array=a, scalar=x) ! { dg-error "Too many arguments" } |
| 15 | |
| 16 | end program foo |