1 !{ dg-do run { target fd_truncate } }
2 ! PR26136 Filling logical variables from namelist read when object list is not
3 ! complete. Test case derived from PR.
4 ! Contributed by Jerry DeLisle <jvdelisle@gcc.gnu.org>
7 logical, dimension(4) :: truely
8 integer, dimension(4) :: truely_a_very_long_variable_name
9 namelist /mynml
/ truely
10 namelist /mynml
/ truely_a_very_long_variable_name
13 truely_a_very_long_variable_name
= 0
15 open(10, status
="scratch")
17 write(10,*) "truely = trouble, traffic .true"
18 write(10,*) "truely_a_very_long_variable_name = 4, 4, 4"
21 read (10, nml
=mynml
, err
= 1000)
22 if (.not
.all(truely(1:3))) call abort()
23 if (.not
.all(truely_a_very_long_variable_name(1:3).eq
.4)) call abort()
26 truely_a_very_long_variable_name
= 0
30 write(10,*) "truely = .true., .true.,"
31 write(10,*) "truely_a_very_long_variable_name = 4, 4, 4"
34 read (10, nml
=mynml
, err
= 1000)
35 if (.not
.all(truely(1:2))) call abort()
36 if (.not
.all(truely_a_very_long_variable_name(1:3).eq
.4)) call abort()
39 truely_a_very_long_variable_name
= 0
43 write(10,*) "truely = .false., .false.,"
44 write(10,*) "truely_a_very_long_variable_name = 4, 4, 4"
47 read (10, nml
=mynml
, err
= 1000)
48 if (all(truely(1:2))) call abort()
49 if (.not
.all(truely_a_very_long_variable_name(1:3).eq
.4)) call abort()
53 end program read_logical