gcc/testsuite/gfortran.dg/pr83939.f90
raw| 1 | ! { dg-do compile } |
| 2 | elemental function f() result(s) ! { dg-error "shall not have an ALLOCATABLE or POINTER" } |
| 3 | allocatable s |
| 4 | allocate(s) |
| 5 | s = 3.5 |
| 6 | end function |
| 7 | |
| 8 | elemental function g() result(s) ! { dg-error "shall not have an ALLOCATABLE or POINTER" } |
| 9 | pointer s |
| 10 | allocate(s) |
| 11 | s = 3.5 |
| 12 | end function |