annotate gcc/testsuite/gfortran.dg/dtio_15.f90 @ 144:8f4e72ab4e11

fix segmentation fault caused by nothing next cur_op to end
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Sun, 23 Dec 2018 21:23:56 +0900
parents 84e7813d76e9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do run }
kono
parents:
diff changeset
2 ! Test that inquire of string internal unit in child process errors.
kono
parents:
diff changeset
3 module string_m
kono
parents:
diff changeset
4 implicit none
kono
parents:
diff changeset
5 type person
kono
parents:
diff changeset
6 character(10) :: aname
kono
parents:
diff changeset
7 integer :: ijklmno
kono
parents:
diff changeset
8 contains
kono
parents:
diff changeset
9 procedure :: write_s
kono
parents:
diff changeset
10 generic :: write(formatted) => write_s
kono
parents:
diff changeset
11 end type person
kono
parents:
diff changeset
12 contains
kono
parents:
diff changeset
13 subroutine write_s (this, lun, iotype, vlist, istat, imsg)
kono
parents:
diff changeset
14 class(person), intent(in) :: this
kono
parents:
diff changeset
15 integer, intent(in) :: lun
kono
parents:
diff changeset
16 character(len=*), intent(in) :: iotype
kono
parents:
diff changeset
17 integer, intent(in) :: vlist(:)
kono
parents:
diff changeset
18 integer, intent(out) :: istat
kono
parents:
diff changeset
19 character(len=*), intent(inout) :: imsg
kono
parents:
diff changeset
20 integer :: filesize
kono
parents:
diff changeset
21 inquire( unit=lun, size=filesize, iostat=istat, iomsg=imsg)
kono
parents:
diff changeset
22 if (istat /= 0) return
kono
parents:
diff changeset
23 end subroutine write_s
kono
parents:
diff changeset
24 end module string_m
kono
parents:
diff changeset
25 program p
kono
parents:
diff changeset
26 use string_m
kono
parents:
diff changeset
27 type(person) :: s
kono
parents:
diff changeset
28 character(len=12) :: msg
kono
parents:
diff changeset
29 integer :: istat
kono
parents:
diff changeset
30 character(len=256) :: imsg = ""
kono
parents:
diff changeset
31 write( msg, "(DT)", iostat=istat) s
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
32 if (istat /= 5018) STOP 1
111
kono
parents:
diff changeset
33 end program p