[ObjectYAML][NFC] Simplify ELFState<ELFT>::initProgramHeaders() (#123703)
[llvm-project.git] / flang / test / Semantics / rewrite03.f90
blob03d09f0af243298181f031a10296a315d582758a
1 !RUN: %flang_fc1 -fdebug-unparse %s 2>&1 | FileCheck %s
2 !Test rewriting of misparsed statement function definitions
3 !into array element assignment statements.
5 program main
6 real sf(1)
7 integer :: j = 1
8 !CHECK: sf(int(j,kind=8))=1._4
9 sf(j) = 1.
10 end
12 function func
13 real sf(1)
14 integer :: j = 1
15 !CHECK: sf(int(j,kind=8))=2._4
16 sf(j) = 2.
17 func = 0.
18 end
20 subroutine subr
21 real sf(1)
22 integer :: j = 1
23 !CHECK: sf(int(j,kind=8))=3._4
24 sf(j) = 3.
25 end
27 module m
28 interface
29 module subroutine smp
30 end
31 end interface
32 end
33 submodule(m) sm
34 contains
35 module procedure smp
36 real sf(1)
37 integer :: j = 1
38 !CHECK: sf(int(j,kind=8))=4._4
39 sf(j) = 4.
40 end
41 end
43 subroutine block
44 block
45 real sf(1)
46 integer :: j = 1
47 !CHECK: sf(int(j,kind=8))=5._4
48 sf(j) = 5.
49 end block
50 end