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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! Tests the fix for PR33376, which was a regression caused by the
3
! fix for PR31564.
4
!
5
! Contributed by Harald Anlauf 
6
!
7
module foo
8
  implicit none
9
  public chk
10
 
11
  type mytype
12
    character(len=4) :: str
13
  end type mytype
14
  type (mytype) ,parameter :: chk (2) &
15
                      = (/ mytype ("abcd") , mytype ("efgh") /)
16
end module foo
17
 
18
module gfcbug70
19
  use foo, only: chk_ => chk
20
  implicit none
21
contains
22
 
23
  subroutine chk (i)
24
    integer, intent(in) :: i
25
    if (i .eq. 1) then
26
      if (chk_(i)% str .ne. "abcd") call abort ()
27
    else
28
      if (chk_(i)% str .ne. "efgh") call abort ()
29
    end if
30
 
31
  end subroutine chk
32
end module gfcbug70
33
 
34
  use gfcbug70
35
  call chk (2)
36
  call chk (1)
37
end
38
! { dg-final { cleanup-modules "foo gfcbug70" } }

powered by: WebSVN 2.1.0

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