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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [array_constructor_6.f90] - Blame information for rev 827

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! PR 12840.  Make sure that array constructors can be used to determine
2
! the bounds of a scalarization loop.
3
! { dg-do run }
4
program main
5
  implicit none
6
  call build (11)
7
contains
8
  subroutine build (order)
9
    integer :: order, i
10
 
11
    call test (order, (/ (i * 2, i = 1, order) /))
12
    call test (17, (/ (i * 2, i = 1, 17) /))
13
    call test (5, (/ 2, 4, 6, 8, 10 /))
14
  end subroutine build
15
 
16
  subroutine test (order, values)
17
    integer, dimension (:) :: values
18
    integer :: order, i
19
 
20
    if (size (values, dim = 1) .ne. order) call abort
21
    do i = 1, order
22
      if (values (i) .ne. i * 2) call abort
23
    end do
24
  end subroutine test
25
end program main

powered by: WebSVN 2.1.0

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