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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! Tests the fix for PR34429 in which function charlens that were
3
! USE associated would cause an error.
4
!
5
! Contributed by Tobias Burnus 
6
!
7
module m
8
  integer, parameter :: l = 2
9
  character(2) :: cl
10
end module m
11
 
12
program test
13
  implicit none
14
  integer, parameter :: l = 5
15
  character(len = 10) :: c
16
  character(4) :: cl
17
  c = f ()
18
  if (g () /= "2") call abort
19
contains
20
  character(len = l) function f ()
21
    use m
22
    if (len (f) /= 2) call abort
23
    f = "a"
24
  end function f
25
  character(len = len (cl)) function g ()
26
    use m
27
    g = "4"
28
    if (len (g) == 2) g= "2"
29
  end function g
30
end program test
31
! { dg-final { cleanup-modules "m" } }

powered by: WebSVN 2.1.0

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