OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
2005-06-28 Thomas Koenig <Thomas.Koenig@online.de>
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
gfortran.fortran-torture
/
execute
/
ptr.f90
1
program ptr
2
implicit none
3
integer, pointer, dimension(:) :: a, b
4
integer, pointer :: p
5
integer, target :: i
6
7
allocate (a(1:6))
8
9
a = (/ 1, 2, 3, 4, 5, 6 /)
10
b => a
11
if (any (b .ne. (/ 1, 2, 3, 4, 5, 6 /))) call abort
12
b => a(1:6:2)
13
if (any (b .ne. (/ 1, 3, 5/))) call abort
14
15
p => i
16
i = 42
17
if (p .ne. 42) call abort
18
p => a(4)
19
if (p .ne. 4) call abort
20
end program