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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! Tests the fix for PR27124 in which the unpacking of argument
3
! temporaries and of array result temporaries occurred in the
4
! incorrect order.
5
!
6
! Test is based on the original example, provided by
7
! Philippe Schaffnit 
8
!
9
  PROGRAM Test
10
    INTEGER :: Array(2, 3) = reshape ((/1,4,2,5,3,6/),(/2,3/))
11
    integer :: Brray(2, 3) = 0
12
    Brray(1,:) = Function_Test (Array(1,:))
13
    if (any(reshape (Brray, (/6/)) .ne. (/11, 0, 12, 0, 13, 0/))) call abort ()
14
    Array(1,:) = Function_Test (Array(1,:))
15
    if (any(reshape (Array, (/6/)) .ne. (/11, 4, 12, 5, 13, 6/))) call abort ()
16
 
17
  contains
18
      FUNCTION Function_Test (Input)
19
          INTEGER, INTENT(IN) :: Input(1:3)
20
          INTEGER :: Function_Test(1:3)
21
          Function_Test = Input + 10
22
      END FUNCTION Function_Test
23
  END PROGRAM Test
24
 

powered by: WebSVN 2.1.0

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