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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! { dg-options "-std=gnu" }
3
! Tests patch for pr27155, where character scalar string_lengths
4
! were not correctly translated by the array transfer intrinsic.
5
!
6
! Contributed by Bo Berggren  
7
!
8
program trf_test
9
      implicit none
10
      character(11) :: s1, s2
11
      integer(4) :: ia(3)
12
      integer(1) :: ba(12)
13
      equivalence (ia, ba)
14
 
15
      s1 = 'ABCDEFGHIJK'
16
      ia = TRANSFER (s1, (/ 0_4 /))
17
      s2 = TRANSFER(ba + 32_1, s2)
18
 
19
      if (s2 .ne. 'abcdefghijk') call abort ()
20
 
21
      s1 = 'AB'
22
      ba = TRANSFER (trim (s1)//'       JK' , (/ 0_1 /))
23
      s2 = TRANSFER(ia, s2)
24
 
25
      if (trim (s1)//'       JK' .ne. s2) call abort ()
26
 
27
end program trf_test

powered by: WebSVN 2.1.0

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