mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-02 16:23:56 +08:00
pr32627.f03 (strptr): Change size to match the number of non-nul characters.
* gfortran.dg/pr32627.f03 (strptr): Change size to match the number of non-nul characters. * gfortran.dg/substr_6.f90: Make the NUL character visible on stdout From-SVN: r222214
This commit is contained in:
parent
67f58944a7
commit
ee7df53194
@ -1,3 +1,9 @@
|
||||
2015-04-18 Martin Sebor <msebor@redhat.com>
|
||||
|
||||
* gfortran.dg/pr32627.f03 (strptr): Change size to match the number
|
||||
of non-nul characters.
|
||||
* gfortran.dg/substr_6.f90: Make the NUL character visible on stdout
|
||||
|
||||
2015-04-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
|
||||
|
||||
PR target/65787
|
||||
|
@ -18,7 +18,7 @@ program main
|
||||
type( c_ptr ) :: x
|
||||
type( A ), pointer :: fptr
|
||||
type( A ), target :: my_a_type
|
||||
character( len=9 ), pointer :: strptr
|
||||
character( len=8 ), pointer :: strptr
|
||||
|
||||
fptr => my_a_type
|
||||
|
||||
|
@ -11,6 +11,15 @@ if (c(1) /= " ") call abort()
|
||||
c = (/ c0(1)(1:5) /)
|
||||
do i=1,5
|
||||
if (c(1)(i:i) /= c1(i)) call abort()
|
||||
|
||||
! Make NULs visible (and avoid corrupting text output).
|
||||
if (c(1)(i:i) == ACHAR(0)) then
|
||||
print "(a,$)", "<NUL>"
|
||||
else
|
||||
print "(a,$)", c(1)(i:i)
|
||||
end if
|
||||
end do
|
||||
print *, c(1)
|
||||
|
||||
print *, ""
|
||||
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user