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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! PR fortran/36316
3
!
4
! gfortran generated a mismatching tree ("type mismatch in binary expression")
5
! for array bounds (mixing integer kind=4/kind=8 without fold_convert).
6
!
7
MODULE YOMCAIN
8
 
9
IMPLICIT NONE
10
SAVE
11
 
12
TYPE distributed_vector
13
REAL, pointer :: local(:)
14
INTEGER(4)       :: global_length,local_start
15
INTEGER(8)       :: local_end
16
END TYPE distributed_vector
17
 
18
INTERFACE ASSIGNMENT (=)
19
MODULE PROCEDURE assign_ar_dv
20
END INTERFACE
21
 
22
INTERFACE OPERATOR (*)
23
MODULE PROCEDURE multiply_dv_dv
24
END INTERFACE
25
 
26
CONTAINS
27
 
28
SUBROUTINE assign_ar_dv (handle,pvec)
29
 
30
!         copy array to the distributed_vector
31
 
32
REAL,                      INTENT(IN)    :: pvec(:)
33
TYPE (distributed_vector), INTENT(INOUT) :: handle
34
 
35
handle%local(:) = pvec(:)
36
 
37
RETURN
38
END SUBROUTINE assign_ar_dv
39
 
40
FUNCTION multiply_dv_dv (handle1,handle2)
41
 
42
!         multiply two distributed_vectors
43
 
44
TYPE (distributed_vector), INTENT(IN) :: handle2
45
TYPE (distributed_vector), INTENT(IN) :: handle1
46
REAL :: multiply_dv_dv(handle1%local_start:handle1%local_end)
47
 
48
multiply_dv_dv = handle1%local(:) * handle2%local(:)
49
 
50
RETURN
51
END FUNCTION multiply_dv_dv
52
 
53
 
54
SUBROUTINE CAININAD_SCALE_DISTVEC ()
55
TYPE (distributed_vector) :: PVAZG
56
TYPE (distributed_vector) :: ZTEMP
57
TYPE (distributed_vector) :: SCALP_DV
58
 
59
ZTEMP = PVAZG * SCALP_DV
60
END SUBROUTINE CAININAD_SCALE_DISTVEC
61
END MODULE YOMCAIN
62
 
63
! { dg-final { cleanup-modules "yomcain" } }

powered by: WebSVN 2.1.0

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