File: llvm-implicit_interface_04-9b6786e.stdout

package info (click to toggle)
lfortran 0.58.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 54,512 kB
  • sloc: cpp: 162,179; f90: 68,251; python: 17,476; ansic: 6,278; yacc: 2,334; sh: 1,317; fortran: 892; makefile: 33; javascript: 15
file content (289 lines) | stat: -rw-r--r-- 14,753 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
; ModuleID = 'LFortran'
source_filename = "LFortran"

%string_descriptor = type <{ i8*, i64 }>

@main.n = internal global i32 3
@0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@serialization_info = private unnamed_addr constant [3 x i8] c"R4\00", align 1
@1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@2 = private unnamed_addr constant [4 x i8] c"arr\00", align 1
@3 = private unnamed_addr constant [190 x i8] c"At 13:18 of file tests/../integration_tests/implicit_interface_04.f90\0ARuntime error: Array '%s' index out of bounds.\0A\0ATried to access index %d of dimension %d, but valid range is %d to %d.\0A\00", align 1
@"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@8 = private unnamed_addr constant [5 x i8] c"arr1\00", align 1
@9 = private unnamed_addr constant [189 x i8] c"At 20:5 of file tests/../integration_tests/implicit_interface_04.f90\0ARuntime error: Array '%s' index out of bounds.\0A\0ATried to access index %d of dimension %d, but valid range is %d to %d.\0A\00", align 1
@10 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@11 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@12 = private unnamed_addr constant [5 x i8] c"arr1\00", align 1
@13 = private unnamed_addr constant [189 x i8] c"At 21:5 of file tests/../integration_tests/implicit_interface_04.f90\0ARuntime error: Array '%s' index out of bounds.\0A\0ATried to access index %d of dimension %d, but valid range is %d to %d.\0A\00", align 1
@14 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@15 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@16 = private unnamed_addr constant [5 x i8] c"arr1\00", align 1
@17 = private unnamed_addr constant [189 x i8] c"At 22:5 of file tests/../integration_tests/implicit_interface_04.f90\0ARuntime error: Array '%s' index out of bounds.\0A\0ATried to access index %d of dimension %d, but valid range is %d to %d.\0A\00", align 1
@18 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@19 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@main.b = internal global [3 x i32] zeroinitializer
@20 = private unnamed_addr constant [2 x i8] c"b\00", align 1
@21 = private unnamed_addr constant [189 x i8] c"At 3:12 of file tests/../integration_tests/implicit_interface_04.f90\0ARuntime error: Array '%s' index out of bounds.\0A\0ATried to access index %d of dimension %d, but valid range is %d to %d.\0A\00", align 1
@22 = private unnamed_addr constant [2 x i8] c"b\00", align 1
@23 = private unnamed_addr constant [189 x i8] c"At 3:12 of file tests/../integration_tests/implicit_interface_04.f90\0ARuntime error: Array '%s' index out of bounds.\0A\0ATried to access index %d of dimension %d, but valid range is %d to %d.\0A\00", align 1
@24 = private unnamed_addr constant [2 x i8] c"b\00", align 1
@25 = private unnamed_addr constant [189 x i8] c"At 3:12 of file tests/../integration_tests/implicit_interface_04.f90\0ARuntime error: Array '%s' index out of bounds.\0A\0ATried to access index %d of dimension %d, but valid range is %d to %d.\0A\00", align 1
@26 = private unnamed_addr constant [7 x i8] c"driver\00", align 1
@27 = private unnamed_addr constant [212 x i8] c"At 6:39 of file tests/../integration_tests/implicit_interface_04.f90\0ARuntime error: Array shape mismatch in subroutine '%s'\0A\0ATried to match size %d of dimension %d of argument number %d, but expected size is %d\0A\00", align 1

define i32 @main(i32 %0, i8** %1) {
.entry:
  %__1_k = alloca i32, align 4
  call void @_lpython_call_initial_functions(i32 %0, i8** %1)
  %__1_k1 = alloca i32, align 4
  store i32 1, i32* %__1_k1, align 4
  %2 = load i32, i32* %__1_k1, align 4
  %3 = sub i32 %2, 1
  %4 = mul i32 1, %3
  %5 = add i32 0, %4
  %6 = icmp slt i32 %2, 1
  %7 = icmp sgt i32 %2, 3
  %8 = or i1 %6, %7
  br i1 %8, label %then, label %ifcont

then:                                             ; preds = %.entry
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([189 x i8], [189 x i8]* @21, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @20, i32 0, i32 0), i32 %2, i32 1, i32 1, i32 3)
  call void @exit(i32 1)
  unreachable

ifcont:                                           ; preds = %.entry
  %9 = getelementptr [3 x i32], [3 x i32]* @main.b, i32 0, i32 %5
  store i32 10, i32* %9, align 4
  store i32 2, i32* %__1_k1, align 4
  %10 = load i32, i32* %__1_k1, align 4
  %11 = sub i32 %10, 1
  %12 = mul i32 1, %11
  %13 = add i32 0, %12
  %14 = icmp slt i32 %10, 1
  %15 = icmp sgt i32 %10, 3
  %16 = or i1 %14, %15
  br i1 %16, label %then2, label %ifcont3

then2:                                            ; preds = %ifcont
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([189 x i8], [189 x i8]* @23, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @22, i32 0, i32 0), i32 %10, i32 1, i32 1, i32 3)
  call void @exit(i32 1)
  unreachable

ifcont3:                                          ; preds = %ifcont
  %17 = getelementptr [3 x i32], [3 x i32]* @main.b, i32 0, i32 %13
  store i32 20, i32* %17, align 4
  store i32 3, i32* %__1_k1, align 4
  %18 = load i32, i32* %__1_k1, align 4
  %19 = sub i32 %18, 1
  %20 = mul i32 1, %19
  %21 = add i32 0, %20
  %22 = icmp slt i32 %18, 1
  %23 = icmp sgt i32 %18, 3
  %24 = or i1 %22, %23
  br i1 %24, label %then4, label %ifcont5

then4:                                            ; preds = %ifcont3
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([189 x i8], [189 x i8]* @25, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @24, i32 0, i32 0), i32 %18, i32 1, i32 1, i32 3)
  call void @exit(i32 1)
  unreachable

ifcont5:                                          ; preds = %ifcont3
  %25 = getelementptr [3 x i32], [3 x i32]* @main.b, i32 0, i32 %21
  store i32 30, i32* %25, align 4
  %26 = load i32, i32* @main.n, align 4
  %27 = icmp slt i32 3, %26
  br i1 %27, label %then6, label %ifcont7

then6:                                            ; preds = %ifcont5
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([212 x i8], [212 x i8]* @27, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @26, i32 0, i32 0), i32 3, i32 1, i32 2, i32 %26)
  call void @exit(i32 1)
  unreachable

ifcont7:                                          ; preds = %ifcont5
  call void @driver(void (i32*, i32*, i32*)* @implicit_interface_check, i32* getelementptr inbounds ([3 x i32], [3 x i32]* @main.b, i32 0, i32 0), i32* @main.n)
  call void @_lpython_free_argv()
  br label %return

return:                                           ; preds = %ifcont7
  ret i32 0
}

define void @driver(void (i32*, i32*, i32*)* %fnc, i32* %arr, i32* %m) {
.entry:
  %0 = alloca i64, align 8
  %1 = alloca float, align 4
  store float 1.000000e+00, float* %1, align 4
  %2 = call i8* (i8*, i64, i8*, i64*, i32, i32, ...) @_lcompilers_string_format_fortran(i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %0, i32 0, i32 0, float* %1)
  %3 = load i64, i64* %0, align 4
  %stringFormat_desc = alloca %string_descriptor, align 8
  %4 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  store i8* %2, i8** %4, align 8
  %5 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  store i64 %3, i64* %5, align 4
  %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  %7 = load i8*, i8** %6, align 8
  %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  %9 = load i64, i64* %8, align 4
  %10 = trunc i64 %9 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %7, i32 %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1)
  call void @_lfortran_free(i8* %2)
  %11 = load i32, i32* %m, align 4
  %12 = add i32 1, %11
  %13 = sub i32 %12, 1
  %14 = icmp sgt i32 3, %13
  %15 = or i1 false, %14
  br i1 %15, label %then, label %ifcont

then:                                             ; preds = %.entry
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([190 x i8], [190 x i8]* @3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @2, i32 0, i32 0), i32 3, i32 1, i32 1, i32 %13)
  call void @exit(i32 1)
  unreachable

ifcont:                                           ; preds = %.entry
  %16 = mul i32 1, %11
  %17 = getelementptr inbounds i32, i32* %arr, i32 2
  call void %fnc(i32* %arr, i32* %m, i32* %17)
  br label %return

return:                                           ; preds = %ifcont
  ret void
}

declare void @fnc(i32*, i32*, i32*)

define void @implicit_interface_check(i32* %arr1, i32* %m, i32* %c) {
.entry:
  %0 = load i32, i32* %m, align 4
  %1 = icmp ne i32 %0, 3
  br i1 %1, label %then, label %else

then:                                             ; preds = %.entry
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont

else:                                             ; preds = %.entry
  br label %ifcont

ifcont:                                           ; preds = %else, %then
  %2 = load i32, i32* %c, align 4
  %3 = icmp ne i32 %2, 30
  br i1 %3, label %then1, label %else2

then1:                                            ; preds = %ifcont
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont3

else2:                                            ; preds = %ifcont
  br label %ifcont3

ifcont3:                                          ; preds = %else2, %then1
  %4 = load i32, i32* %m, align 4
  %5 = add i32 1, %4
  %6 = sub i32 %5, 1
  %7 = icmp sgt i32 1, %6
  %8 = or i1 false, %7
  br i1 %8, label %then4, label %ifcont5

then4:                                            ; preds = %ifcont3
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([189 x i8], [189 x i8]* @9, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @8, i32 0, i32 0), i32 1, i32 1, i32 1, i32 %6)
  call void @exit(i32 1)
  unreachable

ifcont5:                                          ; preds = %ifcont3
  %9 = mul i32 1, %4
  %10 = getelementptr inbounds i32, i32* %arr1, i32 0
  %11 = load i32, i32* %10, align 4
  %12 = icmp ne i32 %11, 10
  br i1 %12, label %then6, label %else7

then6:                                            ; preds = %ifcont5
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @11, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @10, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont8

else7:                                            ; preds = %ifcont5
  br label %ifcont8

ifcont8:                                          ; preds = %else7, %then6
  %13 = load i32, i32* %m, align 4
  %14 = add i32 1, %13
  %15 = sub i32 %14, 1
  %16 = icmp sgt i32 2, %15
  %17 = or i1 false, %16
  br i1 %17, label %then9, label %ifcont10

then9:                                            ; preds = %ifcont8
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([189 x i8], [189 x i8]* @13, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @12, i32 0, i32 0), i32 2, i32 1, i32 1, i32 %15)
  call void @exit(i32 1)
  unreachable

ifcont10:                                         ; preds = %ifcont8
  %18 = mul i32 1, %13
  %19 = getelementptr inbounds i32, i32* %arr1, i32 1
  %20 = load i32, i32* %19, align 4
  %21 = icmp ne i32 %20, 20
  br i1 %21, label %then11, label %else12

then11:                                           ; preds = %ifcont10
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @15, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @14, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont13

else12:                                           ; preds = %ifcont10
  br label %ifcont13

ifcont13:                                         ; preds = %else12, %then11
  %22 = load i32, i32* %m, align 4
  %23 = add i32 1, %22
  %24 = sub i32 %23, 1
  %25 = icmp sgt i32 3, %24
  %26 = or i1 false, %25
  br i1 %26, label %then14, label %ifcont15

then14:                                           ; preds = %ifcont13
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([189 x i8], [189 x i8]* @17, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @16, i32 0, i32 0), i32 3, i32 1, i32 1, i32 %24)
  call void @exit(i32 1)
  unreachable

ifcont15:                                         ; preds = %ifcont13
  %27 = mul i32 1, %22
  %28 = getelementptr inbounds i32, i32* %arr1, i32 2
  %29 = load i32, i32* %28, align 4
  %30 = icmp ne i32 %29, 30
  br i1 %30, label %then16, label %else17

then16:                                           ; preds = %ifcont15
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @19, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @18, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont18

else17:                                           ; preds = %ifcont15
  br label %ifcont18

ifcont18:                                         ; preds = %else17, %then16
  br label %return

return:                                           ; preds = %ifcont18
  ret void
}

declare i8* @_lcompilers_string_format_fortran(i8*, i64, i8*, i64*, i32, i32, ...)

declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32)

declare void @_lfortran_free(i8*)

declare void @_lcompilers_print_error(i8*, ...)

declare void @exit(i32)

declare void @_lpython_call_initial_functions(i32, i8**)

declare void @_lpython_free_argv()