PR target/83368
[official-gcc.git] / gcc / testsuite / gfortran.dg / dec_structure_9.f90
blob34c46c61c1c37a143fc0814b670fd909cec68dfb
1 ! { dg-do compile }
2 ! { dg-options "-fdec-structure" }
4 ! Basic compile tests for what CAN be done with dot ('.') as a member accessor.
7 logical :: l, l2 = .true., l3 = .false., and
8 integer i
9 character(5) s
10 real r
12 structure /s1/
13 integer i
14 character(5) s
15 real r
16 end structure
18 record /s1/ r1
20 ! Basic
21 l = l .and. l2 .or. l3
22 l = and .and. and .and. and
23 l = l2 .eqv. l3
24 l = (l2) .eqv. l3
26 ! Integers
27 l = .not. (i .eq. 0)
28 l = .not. (0 .eq. i)
29 l = .not. (r1.i .eq. 0)
30 l = .not. (0 .eq. r1.i)
31 ! Characters
32 l = .not. (s .eq. "hello")
33 l = .not. ("hello" .eq. s)
34 l = .not. (r1.s .eq. "hello")
35 l = .not. ("hello" .eq. r1.s)
36 ! Reals
37 l = .not. (r .eq. 3.14)
38 l = .not. (3.14 .eq. r)
39 l = .not. (r1.r .eq. 3.14)
40 l = .not. (3.14 .eq. r1.r)
42 end