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
Fix compilation failure with C++98 compilers
[official-gcc.git]
/
gcc
/
testsuite
/
gfortran.dg
/
associate_7.f03
blob
cd37259443eb222119cf754ba16c45a40c47e30e
1
! { dg-do run }
2
! { dg-options "-std=f2003 " }
3
4
! PR fortran/38936
5
! Check association and pointers.
6
7
! Contributed by Daniel Kraft, d@domob.eu.
8
9
PROGRAM main
10
IMPLICIT NONE
11
INTEGER, TARGET :: tgt
12
INTEGER, POINTER :: ptr
13
14
tgt = 1
15
ASSOCIATE (x => tgt)
16
ptr => x
17
IF (ptr /= 1) STOP 1
18
ptr = 2
19
END ASSOCIATE
20
IF (tgt /= 2) STOP 2
21
END PROGRAM main