gcc/testsuite/gfortran.dg/allocate_alloc_opt_5.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-options "-std=f95" } |
| 3 | program a |
| 4 | |
| 5 | implicit none |
| 6 | |
| 7 | integer n |
| 8 | character(len=70) str |
| 9 | integer, allocatable :: i(:) |
| 10 | |
| 11 | n = 42 |
| 12 | allocate(i(4), source=n) ! { dg-error "Fortran 2003: SOURCE tag" } |
| 13 | allocate(i(4), stat=n, errmsg=str) ! { dg-error "Fortran 2003: ERRMSG tag" } |
| 14 | |
| 15 | end program a |