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] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
!
3
! PR fortran/49791
4
!
5
! Contributed by Elliott Sales de Andrade
6
!
7
      program namelist_test
8
 
9
      dimension xpos(5000), ypos(5000)
10
      namelist /geometry/ xpos, ypos
11
 
12
      xpos = -huge(xpos)
13
      ypos = -huge(ypos)
14
 
15
      open(unit=4,file='geometry.in')
16
      write(4,'(a)') '$geometry'
17
      write(4,'(a)') ' xpos(1)= 0.00, 0.10, 0.20, 0.30, 0.40,'
18
      write(4,'(a)') ' ypos(1)= 0.50, 0.60, 0.70, 0.80, 0.90,'
19
      write(4,'(a)') '$end'
20
 
21
      close(4)
22
 
23
      open (unit=4,file='geometry.in',status='old',form='formatted')
24
      read (4,geometry)
25
      close(4, status='delete')
26
 
27
      !print *, 'xpos', xpos(1:10), 'ypos', ypos(1:10)
28
 
29
      if (any (xpos(1:5) /= [0.00, 0.10, 0.20, 0.30, 0.40]))call abort()
30
      if (any (ypos(1:5) /= [0.50, 0.60, 0.70, 0.80, 0.90]))call abort()
31
      if (any (xpos(6:) /= -huge(xpos))) call abort ()
32
      if (any (ypos(6:) /= -huge(ypos))) call abort ()
33
      end

powered by: WebSVN 2.1.0

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