Debian Codegraph @

gcc/testsuite/gfortran.dg/dec_structure_11.f90

raw
1 ! { dg-do compile }
2 ! { dg-options "-fdec-structure" }
3 !
4 ! Tests for what CAN'T be done with dot ('.') as a member accessor.
5 !
6
7 structure /s1/
8 integer eq
9 end structure
10
11 record /s1/ r
12 integer i, j, k
13
14 j = i.j ! { dg-error "nonderived-type variable" }
15 j = r .eq. i ! { dg-error "Operands of comparison" }
16 j = r.i ! { dg-error "is not a member of" }
17 j = r. ! { dg-error "Expected structure component or operator name" }
18 j = .i ! { dg-error "Invalid character in name" }
19
20 end