annotate gcc/testsuite/gfortran.dg/dec_structure_9.f90 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do compile }
kono
parents:
diff changeset
2 ! { dg-options "-fdec-structure" }
kono
parents:
diff changeset
3 !
kono
parents:
diff changeset
4 ! Basic compile tests for what CAN be done with dot ('.') as a member accessor.
kono
parents:
diff changeset
5 !
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 logical :: l, l2 = .true., l3 = .false., and
kono
parents:
diff changeset
8 integer i
kono
parents:
diff changeset
9 character(5) s
kono
parents:
diff changeset
10 real r
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 structure /s1/
kono
parents:
diff changeset
13 integer i
kono
parents:
diff changeset
14 character(5) s
kono
parents:
diff changeset
15 real r
kono
parents:
diff changeset
16 end structure
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 record /s1/ r1
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 ! Basic
kono
parents:
diff changeset
21 l = l .and. l2 .or. l3
kono
parents:
diff changeset
22 l = and .and. and .and. and
kono
parents:
diff changeset
23 l = l2 .eqv. l3
kono
parents:
diff changeset
24 l = (l2) .eqv. l3
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 ! Integers
kono
parents:
diff changeset
27 l = .not. (i .eq. 0)
kono
parents:
diff changeset
28 l = .not. (0 .eq. i)
kono
parents:
diff changeset
29 l = .not. (r1.i .eq. 0)
kono
parents:
diff changeset
30 l = .not. (0 .eq. r1.i)
kono
parents:
diff changeset
31 ! Characters
kono
parents:
diff changeset
32 l = .not. (s .eq. "hello")
kono
parents:
diff changeset
33 l = .not. ("hello" .eq. s)
kono
parents:
diff changeset
34 l = .not. (r1.s .eq. "hello")
kono
parents:
diff changeset
35 l = .not. ("hello" .eq. r1.s)
kono
parents:
diff changeset
36 ! Reals
kono
parents:
diff changeset
37 l = .not. (r .eq. 3.14)
kono
parents:
diff changeset
38 l = .not. (3.14 .eq. r)
kono
parents:
diff changeset
39 l = .not. (r1.r .eq. 3.14)
kono
parents:
diff changeset
40 l = .not. (3.14 .eq. r1.r)
kono
parents:
diff changeset
41
kono
parents:
diff changeset
42 end