repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
RISC-V: Regenerate opt urls.
[official-gcc.git]
/
gcc
/
testsuite
/
gfortran.dg
/
import.f90
blob
4830eccc87d85db7746457b9bb9962d6f7ade37a
1
! { dg-do run }
2
! Test whether import works
3
! PR fortran/29601
4
5
subroutine
test
(
x
)
6
type
myType3
7
sequence
8
integer
::
i
9
end type
myType3
10
type
(
myType3
) ::
x
11
if
(
x
%
i
/=
7
)
STOP
1
12
x
%
i
=
1
13
end subroutine
test
14
15
16
subroutine
bar
(
x
,
y
)
17
type
myType
18
sequence
19
integer
::
i
20
end type
myType
21
type
(
myType
) ::
x
22
integer
(
8
) ::
y
23
if
(
y
/=
8
)
STOP
2
24
if
(
x
%
i
/=
2
)
STOP
3
25
x
%
i
=
5
26
y
=
42
27
end subroutine
bar
28
29
module
testmod
30
implicit none
31
integer
,
parameter
::
kind
=
8
32
type
modType
33
real
::
rv
34
end type
modType
35
interface
36
subroutine
other
(
x
,
y
)
37
import
38
real
(
kind
) ::
x
39
type
(
modType
) ::
y
40
end subroutine
41
end interface
42
end module
testmod
43
44
program
foo
45
integer
,
parameter
::
dp
=
8
46
type
myType
47
sequence
48
integer
::
i
49
end type
myType
50
type
myType3
51
sequence
52
integer
::
i
53
end type
myType3
54
interface
55
subroutine
bar
(
x
,
y
)
56
import
57
type
(
myType
) ::
x
58
integer
(
dp
) ::
y
59
end subroutine
bar
60
subroutine
test
(
x
)
61
import
::
myType3
62
import myType3
! { dg-warning "already IMPORTed from" }
63
type
(
myType3
) ::
x
64
end subroutine
test
65
end interface
66
67
type
(
myType
) ::
y
68
type
(
myType3
) ::
z
69
integer
(
8
) ::
i8
70
y
%
i
=
2
71
i8
=
8
72
call
bar
(
y
,
i8
)
73
if
(
y
%
i
/=
5
.
or
.
i8
/=
42
)
STOP
4
74
z
%
i
=
7
75
call
test
(
z
)
76
if
(
z
%
i
/=
1
)
STOP
5
77
end program
foo