diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/dec_structure_11.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/dec_structure_11.f90 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/dec_structure_11.f90 b/gcc/testsuite/gfortran.dg/dec_structure_11.f90 new file mode 100644 index 0000000000..f6f5b6f9d1 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/dec_structure_11.f90 @@ -0,0 +1,20 @@ +! { dg-do compile } +! { dg-options "-fdec-structure" } +! +! Tests for what CAN'T be done with dot ('.') as a member accessor. +! + +structure /s1/ + integer eq +end structure + +record /s1/ r +integer i, j, k + +j = i.j ! { dg-error "nonderived-type variable" } +j = r .eq. i ! { dg-error "Operands of comparison" } +j = r.i ! { dg-error "is not a member of" } +j = r. ! { dg-error "Expected structure component or operator name" } +j = .i ! { dg-error "Invalid character in name" } + +end |