gcc/testsuite/gfortran.dg/dec_structure_20.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-options "-fdec-structure" } |
| 3 | ! |
| 4 | ! Test error handling for %FILL |
| 5 | ! |
| 6 | implicit none |
| 7 | |
| 8 | structure /s/ |
| 9 | integer(2) i /3/ |
| 10 | integer(2) %fill /4/ ! { dg-error "cannot have an initializer" } |
| 11 | integer(2), pointer :: %fill ! { dg-error "cannot have attributes" } |
| 12 | end structure |
| 13 | |
| 14 | type t |
| 15 | integer %fill ! { dg-error "not allowed outside STRUCTURE" } |
| 16 | endtype |
| 17 | |
| 18 | end |