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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [array_constructor_21.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
!
3
! PR fortran/34785, in which the character length of BA_T was not
4
! passed on to the array constructor argument of SEQ.
5
!
6
! Contributed by Dick Hendrickson 
7
!
8
      MODULE o_TYPE_DEFS
9
        implicit none
10
        TYPE SEQ
11
          SEQUENCE
12
          CHARACTER(len = 9) ::  BA(2)
13
        END TYPE SEQ
14
        CHARACTER(len = 9)   ::  BA_T(2)
15
        CHARACTER(LEN = 9)   ::  CA_T(1,2)
16
      END MODULE o_TYPE_DEFS
17
 
18
      MODULE TESTS
19
        use o_type_defs
20
        implicit none
21
      CONTAINS
22
        SUBROUTINE OG0015(UDS0L)
23
          TYPE(SEQ)          UDS0L
24
          integer :: j1
25
          UDS0L = SEQ((/ (BA_T(J1),J1=1,2) /))
26
        END SUBROUTINE
27
      END MODULE TESTS
28
 
29
      use o_type_defs
30
      CONTAINS
31
        SUBROUTINE OG0015(UDS0L)
32
          TYPE(SEQ)          UDS0L
33
          UDS0L = SEQ(RESHAPE ( (/ ((CA_T(J1,J2), J1 = 1, 1), J2 = 1, 2)/),(/2/)))
34
        END SUBROUTINE
35
      END
36
! { dg-final { cleanup-modules "o_type_defs tests" } }

powered by: WebSVN 2.1.0

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