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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [namelist_72.f] - Rev 694

Compare with Previous | Blame | View Log

! { dg-do run }
!
! PR fortran/49791
!
! Contributed by Elliott Sales de Andrade
!
      program namelist_test
 
      dimension xpos(5000), ypos(5000)
      namelist /geometry/ xpos, ypos
 
      xpos = -huge(xpos)
      ypos = -huge(ypos)
 
      open(unit=4,file='geometry.in')
      write(4,'(a)') '$geometry'
      write(4,'(a)') ' xpos(1)= 0.00, 0.10, 0.20, 0.30, 0.40,'
      write(4,'(a)') ' ypos(1)= 0.50, 0.60, 0.70, 0.80, 0.90,'
      write(4,'(a)') '$end'
 
      close(4)
 
      open (unit=4,file='geometry.in',status='old',form='formatted')
      read (4,geometry)
      close(4, status='delete')
 
      !print *, 'xpos', xpos(1:10), 'ypos', ypos(1:10)
 
      if (any (xpos(1:5) /= [0.00, 0.10, 0.20, 0.30, 0.40]))call abort()
      if (any (ypos(1:5) /= [0.50, 0.60, 0.70, 0.80, 0.90]))call abort()
      if (any (xpos(6:) /= -huge(xpos))) call abort ()
      if (any (ypos(6:) /= -huge(ypos))) call abort ()
      end
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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