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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [st_function_1.f90] - Blame information for rev 695

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 695 jeremybenn
! Check that character valued statement functions honour length parameters
2
program st_function_1
3
  character(8) :: foo
4
  character(15) :: bar
5
  character(6) :: p
6
  character (7) :: s
7
  foo(p) = p // "World"
8
  bar(p) = p // "World"
9
 
10
  ! Expression longer than function, actual arg shorter than dummy.
11
  call check (foo("Hello"), "Hello Wo") ! { dg-warning "Character length of actual argument shorter" }
12
 
13
  ! Expression shorter than function, actual arg longer than dummy.
14
  ! Result shorter than type
15
  s = "Hello"
16
  call check (bar(s), "Hello World    ")
17
contains
18
subroutine check(a, b)
19
  character (len=*) :: a, b
20
 
21
  if ((a .ne. b) .or. (len(a) .ne. len(b))) call abort ()
22
end subroutine
23
end program

powered by: WebSVN 2.1.0

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