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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! This testcase was miscompiled, because ts.cl
2
! in function bar was initially shared between both
3
! dummy arguments.  Although it was later unshared,
4
! all expressions which copied ts.cl from bar2
5
! before that used incorrectly bar1's length
6
! instead of bar2.
7
! { dg-do run }
8
 
9
subroutine foo (foo1, foo2)
10
  implicit none
11
  integer, intent(in) :: foo2
12
  character(*), intent(in) :: foo1(foo2)
13
end subroutine foo
14
 
15
subroutine bar (bar1, bar2)
16
  implicit none
17
  character(*), intent(in) :: bar1, bar2
18
 
19
  call foo ((/ bar2 /), 1)
20
end subroutine bar
21
 
22
program test
23
  character(80) :: str1
24
  character(5) :: str2
25
 
26
  str1 = 'String'
27
  str2 = 'Strng'
28
  call bar (str2, str1)
29
end program test

powered by: WebSVN 2.1.0

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