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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [internal_pack_8.f90] - Rev 801

Go to most recent revision | Compare with Previous | Blame | View Log

! { dg-do run }
!
! Test the fix for PR43111, in which necessary calls to
! internal PACK/UNPACK were not being generated because
! of an over agressive fix to PR41113/7.
!
! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
!
SUBROUTINE S2(I)
 INTEGER :: I(4)
 !write(6,*) I
 IF (ANY(I.NE.(/3,5,7,9/))) CALL ABORT()
END SUBROUTINE S2

MODULE M1
 TYPE T1
  INTEGER, POINTER, DIMENSION(:) :: data
 END TYPE T1
CONTAINS
 SUBROUTINE S1()
   TYPE(T1) :: d
   INTEGER, TARGET, DIMENSION(10) :: scratch=(/(i,i=1,10)/)
   INTEGER :: i=2
   d%data=>scratch(1:9:2)
!   write(6,*) d%data(i:)
   CALL S2(d%data(i:))
 END SUBROUTINE S1
END MODULE M1

USE M1
CALL S1
END
! { dg-final { cleanup-modules "m1" } }

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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