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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! PR 45170
3
! A variation of a theme for deferred type parameters.  The
4
! substring reference in the source= portion of the allocate
5
! was not probably resolved.  Testcase is a modified version
6
! of a program due to Hans-Werner Boschmann 
7
! dot physik dot uni-siegen dot de>
8
!
9
program helloworld
10
  character(:),allocatable::string
11
  real::rnd
12
  call hello(5, string)
13
  if (string /= 'hello' .or. len(string) /= 5) call abort
14
contains
15
  subroutine hello (n,string)
16
    character(:),allocatable,intent(out)::string
17
    integer,intent(in)::n
18
    character(20)::helloworld="hello world"
19
   allocate(string, source=helloworld(:n))
20
  end subroutine hello
21
end program helloworld

powered by: WebSVN 2.1.0

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