OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [read_null_string.f90] - Diff between revs 303 and 338

Only display areas with differences | Details | Blame | View Log

Rev 303 Rev 338
! pr 16080, segfault on reading an empty string
! pr 16080, segfault on reading an empty string
      implicit none
      implicit none
      integer t
      integer t
      character*20   temp_name
      character*20   temp_name
      character*2 quotes
      character*2 quotes
      open(unit=7,status='SCRATCH')
      open(unit=7,status='SCRATCH')
      quotes = '""""'  ! "" in the file
      quotes = '""""'  ! "" in the file
      write(7,*)1
      write(7,*)1
      write(7,'(A)')quotes
      write(7,'(A)')quotes
      temp_name = 'hello'  ! make sure the read overwrites it
      temp_name = 'hello'  ! make sure the read overwrites it
      rewind(7)
      rewind(7)
      read(7, *) t
      read(7, *) t
      read(7, *) temp_name
      read(7, *) temp_name
      if (temp_name.ne.'') call abort
      if (temp_name.ne.'') call abort
      end
      end
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.