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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! PR middle-end/43866
2
! { dg-do run }
3
! { dg-options "-funswitch-loops -fbounds-check" }
4
 
5
MODULE PR43866
6
  IMPLICIT NONE
7
  TYPE TT
8
    REAL(KIND=4), DIMENSION(:,:), POINTER :: A
9
    REAL(KIND=8), DIMENSION(:,:), POINTER :: B
10
  END TYPE
11
CONTAINS
12
  SUBROUTINE FOO(M,X,Y,T)
13
    TYPE(TT), POINTER :: M
14
    INTEGER, INTENT(IN) :: Y, X
15
    INTEGER :: C, D
16
    LOGICAL :: T
17
    REAL(KIND = 4), DIMENSION(:,:), POINTER :: P
18
    REAL(KIND = 8), DIMENSION(:,:), POINTER :: Q
19
 
20
    Q => M%B
21
    P => M%A
22
    DO C=1,X
23
      DO D=C+1,Y
24
        IF (T) THEN
25
          P(D,C)=P(C,D)
26
        ELSE
27
          Q(D,C)=Q(C,D)
28
        ENDIF
29
      ENDDO
30
    ENDDO
31
  END SUBROUTINE FOO
32
END MODULE PR43866
33
 
34
  USE PR43866
35
  TYPE(TT), POINTER :: Q
36
  INTEGER, PARAMETER :: N=17
37
  ALLOCATE (Q)
38
  NULLIFY (Q%A)
39
  ALLOCATE (Q%B(N,N))
40
  Q%B=0
41
  CALL FOO (Q,N,N,.FALSE.)
42
END
43
 
44
! { dg-final { cleanup-modules "pr43866" } }

powered by: WebSVN 2.1.0

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