OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [mapping_3.f90] - Blame information for rev 302

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
! Tests the fix for PR33888, in which the character length of
3
! the elemental function myfunc was not being calculated before
4
! the temporary for the array result was allocated.
5
!
6
! Contributed by Walter Spector 
7
!
8
program ftn95bug
9
  implicit none
10
 
11
  character(8) :: indata(4) =  &
12
              (/ '12344321', '98766789', 'abcdefgh', 'ABCDEFGH' /)
13
 
14
  call process (myfunc (indata))  ! <- This caused a gfortran ICE !
15
 
16
contains
17
 
18
  elemental function myfunc (s)
19
    character(*), intent(in) :: s
20
    character(len (s)) :: myfunc
21
 
22
    myfunc = s
23
 
24
  end function
25
 
26
  subroutine process (strings)
27
    character(*), intent(in) :: strings(:)
28
 
29
    if (any (strings .ne. indata)) call abort ()
30
 
31
  end subroutine
32
 
33
end program

powered by: WebSVN 2.1.0

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