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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [module_write_1.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/41869
4
!
5
! Was ICEing while module write of symbol 'vs_str' in m_dom_dom
6
! because of "len" being private in fox_m_fsys_format.
7
!
8
module fox_m_fsys_array_str
9
contains
10
  pure function str_vs(vs) result(s)
11
    character, dimension(:), intent(in) :: vs
12
    character(len=size(vs)) :: s
13
    s = transfer(vs, s)
14
  end function str_vs
15
  pure function vs_str(s) result(vs)
16
    character(len=*), intent(in) :: s
17
    character, dimension(len(s)) :: vs
18
    vs = transfer(s, vs)
19
  end function vs_str
20
end module fox_m_fsys_array_str
21
 
22
module fox_m_fsys_format
23
  private
24
  interface str
25
    module procedure  str_logical_array
26
  end interface str
27
  interface len
28
    module procedure str_logical_array_len
29
  end interface
30
  public :: str
31
contains
32
  pure function str_logical_array_len(la) result(n)
33
    logical, dimension(:), intent(in)   :: la
34
  end function str_logical_array_len
35
  pure function str_logical_array(la) result(s)
36
    logical, dimension(:), intent(in)   :: la
37
    character(len=len(la)) :: s
38
  end function str_logical_array
39
  pure function checkFmt(fmt) result(good)
40
    character(len=*), intent(in) :: fmt
41
    logical :: good
42
    good = len(fmt) > 0
43
  end function checkFmt
44
end module fox_m_fsys_format
45
 
46
module m_dom_dom
47
  use fox_m_fsys_array_str, only: str_vs, vs_str
48
end module m_dom_dom
49
 
50
module FoX_dom
51
  use fox_m_fsys_format
52
  use m_dom_dom
53
end module FoX_dom
54
 
55
use FoX_dom
56
implicit none
57
print *, vs_str("ABC")
58
end
59
! { dg-final { cleanup-modules "fox_m_fsys_array_str fox_m_fsys_format m_dom_dom fox_dom" } }

powered by: WebSVN 2.1.0

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