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/] [pr43866.f90] - Rev 484

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

! PR middle-end/43866
! { dg-do run }
! { dg-options "-funswitch-loops -fbounds-check" }

MODULE PR43866
  IMPLICIT NONE
  TYPE TT
    REAL(KIND=4), DIMENSION(:,:), POINTER :: A
    REAL(KIND=8), DIMENSION(:,:), POINTER :: B
  END TYPE
CONTAINS
  SUBROUTINE FOO(M,X,Y,T)
    TYPE(TT), POINTER :: M
    INTEGER, INTENT(IN) :: Y, X
    INTEGER :: C, D
    LOGICAL :: T
    REAL(KIND = 4), DIMENSION(:,:), POINTER :: P
    REAL(KIND = 8), DIMENSION(:,:), POINTER :: Q

    Q => M%B
    P => M%A
    DO C=1,X
      DO D=C+1,Y
        IF (T) THEN
          P(D,C)=P(C,D)
        ELSE
          Q(D,C)=Q(C,D)
        ENDIF
      ENDDO
    ENDDO
  END SUBROUTINE FOO
END MODULE PR43866

  USE PR43866
  TYPE(TT), POINTER :: Q
  INTEGER, PARAMETER :: N=17
  ALLOCATE (Q)
  NULLIFY (Q%A)
  ALLOCATE (Q%B(N,N))
  Q%B=0
  CALL FOO (Q,N,N,.FALSE.)
END

! { dg-final { cleanup-modules "pr43866" } }

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.