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
PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git]
/
gcc
/
testsuite
/
gfortran.dg
/
block_1.f08
blob
8f9ff5750173e5a80e2158cdef4ce982d4273ad7
1
! { dg-do run }
2
! { dg-options "-std=f2008 " }
3
4
! Basic Fortran 2008 BLOCK construct test.
5
6
PROGRAM main
7
IMPLICIT NONE
8
INTEGER :: i
9
10
i = 42
11
12
! Empty block.
13
BLOCK
14
END BLOCK
15
16
! Block without local variables but name.
17
BLOCK
18
IF (i /= 42) STOP 1
19
i = 5
20
END BLOCK
21
IF (i /= 5) STOP 2
22
23
! Named block with local variable and nested block.
24
myblock: BLOCK
25
INTEGER :: i
26
i = -1
27
BLOCK
28
IF (i /= -1) STOP 3
29
i = -2
30
END BLOCK
31
IF (i /= -2) STOP 4
32
END BLOCK myblock ! Matching end-label.
33
IF (i /= 5) STOP 5
34
END PROGRAM main