[llvm][Docs] Update supported hardware (#121743)
[llvm-project.git] / flang / test / Semantics / call38.f90
blob34aae6b8b18357b52d9d7fa4468afda5487909ab
1 ! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic -Werror
2 ! Tests the checking of storage sequence argument association (F'2023 15.2.5.12)
3 module nonchar
4 contains
5 subroutine scalar(a)
6 real a
7 end
8 subroutine explicit1(a)
9 real a(2)
10 end
11 subroutine explicit2(a)
12 real a(2,2)
13 end
14 subroutine assumedSize1(a)
15 real a(*)
16 end
17 subroutine assumedSize2(a)
18 real a(2,*)
19 end
20 subroutine assumedShape1(a)
21 real a(:)
22 end
23 subroutine assumedShape2(a)
24 real a(:,:)
25 end
26 subroutine assumedRank(a)
27 real a(..)
28 end
29 subroutine allocatable0(a)
30 real, allocatable :: a
31 end
32 subroutine allocatable1(a)
33 real, allocatable :: a(:)
34 end
35 subroutine allocatable2(a)
36 real, allocatable :: a(:,:)
37 end
38 subroutine pointer0(a)
39 real, intent(in), pointer :: a
40 end
41 subroutine pointer1(a)
42 real, intent(in), pointer :: a(:)
43 end
44 subroutine pointer2(a)
45 real, intent(in), pointer :: a(:,:)
46 end
47 subroutine coarray0(a)
48 real a[*]
49 end
51 subroutine test
52 real, target :: scalar0
53 real, target :: vector1(1), vector2(2), vector4(4)
54 real, target :: matrix11(1,1), matrix12(1,2), matrix22(2,2)
55 real, allocatable :: alloScalar, alloVector(:), alloMatrix(:,:)
57 call scalar(scalar0)
58 !ERROR: Rank of dummy argument is 0, but actual argument has rank 1
59 call scalar(vector1)
60 call scalar(vector1(1))
62 !ERROR: Whole scalar actual argument may not be associated with a dummy argument 'a=' array
63 call explicit1(scalar0)
64 !ERROR: Actual argument array has fewer elements (1) than dummy argument 'a=' array (2)
65 call explicit1(vector1)
66 call explicit1(vector2)
67 call explicit1(vector4)
68 !ERROR: Actual argument has fewer elements remaining in storage sequence (1) than dummy argument 'a=' array (2)
69 call explicit1(vector2(2))
70 call explicit1(vector4(3))
71 !ERROR: Actual argument has fewer elements remaining in storage sequence (1) than dummy argument 'a=' array (2)
72 call explicit1(vector4(4))
73 !ERROR: Actual argument array has fewer elements (1) than dummy argument 'a=' array (2)
74 call explicit1(matrix11)
76 !ERROR: Whole scalar actual argument may not be associated with a dummy argument 'a=' array
77 call explicit2(scalar0)
78 !ERROR: Actual argument array has fewer elements (1) than dummy argument 'a=' array (4)
79 call explicit2(vector1)
80 !ERROR: Actual argument array has fewer elements (2) than dummy argument 'a=' array (4)
81 call explicit2(vector2)
82 call explicit2(vector4)
83 !ERROR: Actual argument has fewer elements remaining in storage sequence (1) than dummy argument 'a=' array (4)
84 call explicit2(vector2(2))
85 !ERROR: Actual argument has fewer elements remaining in storage sequence (3) than dummy argument 'a=' array (4)
86 call explicit2(vector4(2))
87 call explicit2(vector4(1))
88 !ERROR: Actual argument array has fewer elements (1) than dummy argument 'a=' array (4)
89 call explicit2(matrix11)
90 !ERROR: Actual argument array has fewer elements (2) than dummy argument 'a=' array (4)
91 call explicit2(matrix12)
92 call explicit2(matrix22)
93 call explicit2(matrix22(1,1))
94 !ERROR: Actual argument has fewer elements remaining in storage sequence (3) than dummy argument 'a=' array (4)
95 call explicit2(matrix22(2,1))
97 !ERROR: Whole scalar actual argument may not be associated with a dummy argument 'a=' array
98 call assumedSize1(scalar0)
99 call assumedSize1(vector1)
100 call assumedSize1(vector2)
101 call assumedSize1(vector4)
102 call assumedSize1(vector2(2))
103 call assumedSize1(vector4(2))
104 call assumedSize1(vector4(1))
105 call assumedSize1(matrix11)
106 call assumedSize1(matrix12)
107 call assumedSize1(matrix22)
108 call assumedSize1(matrix22(1,1))
109 call assumedSize1(matrix22(2,1))
111 !ERROR: Whole scalar actual argument may not be associated with a dummy argument 'a=' array
112 call assumedSize2(scalar0)
113 call assumedSize2(vector1)
114 call assumedSize2(vector2)
115 call assumedSize2(vector4)
116 call assumedSize2(vector2(2))
117 call assumedSize2(vector4(2))
118 call assumedSize2(vector4(1))
119 call assumedSize2(matrix11)
120 call assumedSize2(matrix12)
121 call assumedSize2(matrix22)
122 call assumedSize2(matrix22(1,1))
123 call assumedSize2(matrix22(2,1))
125 !ERROR: Scalar actual argument may not be associated with assumed-shape dummy argument 'a='
126 call assumedShape1(scalar0)
127 call assumedShape1(vector1)
128 call assumedShape1(vector2)
129 call assumedShape1(vector4)
130 !ERROR: Scalar actual argument may not be associated with assumed-shape dummy argument 'a='
131 call assumedShape1(vector2(2))
132 !ERROR: Rank of dummy argument is 1, but actual argument has rank 2
133 call assumedShape1(matrix11)
134 !ERROR: Rank of dummy argument is 1, but actual argument has rank 2
135 call assumedShape1(matrix12)
136 !ERROR: Rank of dummy argument is 1, but actual argument has rank 2
137 call assumedShape1(matrix22)
138 !ERROR: Scalar actual argument may not be associated with assumed-shape dummy argument 'a='
139 call assumedShape1(matrix22(1,1))
141 !ERROR: Scalar actual argument may not be associated with assumed-shape dummy argument 'a='
142 call assumedShape2(scalar0)
143 !ERROR: Rank of dummy argument is 2, but actual argument has rank 1
144 call assumedShape2(vector1)
145 !ERROR: Rank of dummy argument is 2, but actual argument has rank 1
146 call assumedShape2(vector2)
147 !ERROR: Rank of dummy argument is 2, but actual argument has rank 1
148 call assumedShape2(vector4)
149 !ERROR: Scalar actual argument may not be associated with assumed-shape dummy argument 'a='
150 call assumedShape2(vector2(2))
151 call assumedShape2(matrix11)
152 call assumedShape2(matrix12)
153 call assumedShape2(matrix22)
154 !ERROR: Scalar actual argument may not be associated with assumed-shape dummy argument 'a='
155 call assumedShape2(matrix22(1,1))
157 call assumedRank(scalar0)
158 call assumedRank(vector1)
159 call assumedRank(vector1(1))
160 call assumedRank(matrix11)
161 call assumedRank(matrix11(1,1))
163 !ERROR: ALLOCATABLE dummy argument 'a=' must be associated with an ALLOCATABLE actual argument
164 call allocatable0(scalar0)
165 call allocatable0(alloScalar)
166 !ERROR: Rank of dummy argument is 0, but actual argument has rank 1
167 call allocatable0(alloVector)
168 !ERROR: ALLOCATABLE dummy argument 'a=' must be associated with an ALLOCATABLE actual argument
169 call allocatable0(alloVector(1))
170 !ERROR: Rank of dummy argument is 0, but actual argument has rank 2
171 call allocatable0(alloMatrix)
172 !ERROR: ALLOCATABLE dummy argument 'a=' must be associated with an ALLOCATABLE actual argument
173 call allocatable0(alloMatrix(1,1))
175 !ERROR: Rank of dummy argument is 1, but actual argument has rank 0
176 !ERROR: ALLOCATABLE dummy argument 'a=' must be associated with an ALLOCATABLE actual argument
177 call allocatable1(scalar0)
178 !ERROR: Rank of dummy argument is 1, but actual argument has rank 0
179 call allocatable1(alloScalar)
180 call allocatable1(alloVector)
181 !ERROR: Rank of dummy argument is 1, but actual argument has rank 0
182 !ERROR: ALLOCATABLE dummy argument 'a=' must be associated with an ALLOCATABLE actual argument
183 call allocatable1(alloVector(1))
184 !ERROR: Rank of dummy argument is 1, but actual argument has rank 2
185 call allocatable1(alloMatrix)
186 !ERROR: Rank of dummy argument is 1, but actual argument has rank 0
187 !ERROR: ALLOCATABLE dummy argument 'a=' must be associated with an ALLOCATABLE actual argument
188 call allocatable1(alloMatrix(1,1))
190 !ERROR: Rank of dummy argument is 2, but actual argument has rank 0
191 !ERROR: ALLOCATABLE dummy argument 'a=' must be associated with an ALLOCATABLE actual argument
192 call allocatable2(scalar0)
193 !ERROR: Rank of dummy argument is 2, but actual argument has rank 0
194 call allocatable2(alloScalar)
195 !ERROR: Rank of dummy argument is 2, but actual argument has rank 1
196 call allocatable2(alloVector)
197 !ERROR: Rank of dummy argument is 2, but actual argument has rank 0
198 !ERROR: ALLOCATABLE dummy argument 'a=' must be associated with an ALLOCATABLE actual argument
199 call allocatable2(alloVector(1))
200 call allocatable2(alloMatrix)
201 !ERROR: Rank of dummy argument is 2, but actual argument has rank 0
202 !ERROR: ALLOCATABLE dummy argument 'a=' must be associated with an ALLOCATABLE actual argument
203 call allocatable2(alloMatrix(1,1))
205 call pointer0(scalar0)
206 !ERROR: Rank of dummy argument is 0, but actual argument has rank 1
207 !ERROR: Pointer has rank 0 but target has rank 1
208 call pointer0(vector1)
209 call pointer0(vector1(1))
210 !ERROR: Rank of dummy argument is 0, but actual argument has rank 2
211 !ERROR: Pointer has rank 0 but target has rank 2
212 call pointer0(matrix11)
213 call pointer0(matrix11(1,1))
215 !ERROR: Rank of dummy argument is 1, but actual argument has rank 0
216 !ERROR: Pointer has rank 1 but target has rank 0
217 call pointer1(scalar0)
218 call pointer1(vector1)
219 !ERROR: Rank of dummy argument is 1, but actual argument has rank 0
220 !ERROR: Pointer has rank 1 but target has rank 0
221 call pointer1(vector1(1))
222 !ERROR: Rank of dummy argument is 1, but actual argument has rank 2
223 !ERROR: Pointer has rank 1 but target has rank 2
224 call pointer1(matrix11)
225 !ERROR: Rank of dummy argument is 1, but actual argument has rank 0
226 !ERROR: Pointer has rank 1 but target has rank 0
227 call pointer1(matrix11(1,1))
229 !ERROR: Rank of dummy argument is 2, but actual argument has rank 0
230 !ERROR: Pointer has rank 2 but target has rank 0
231 call pointer2(scalar0)
232 !ERROR: Rank of dummy argument is 2, but actual argument has rank 1
233 !ERROR: Pointer has rank 2 but target has rank 1
234 call pointer2(vector1)
235 !ERROR: Rank of dummy argument is 2, but actual argument has rank 0
236 !ERROR: Pointer has rank 2 but target has rank 0
237 call pointer2(vector1(1))
238 call pointer2(matrix11)
239 !ERROR: Rank of dummy argument is 2, but actual argument has rank 0
240 !ERROR: Pointer has rank 2 but target has rank 0
241 call pointer2(matrix11(1,1))
243 !ERROR: Actual argument associated with coarray dummy argument 'a=' must be a coarray
244 call coarray0(scalar0)
245 !ERROR: Rank of dummy argument is 0, but actual argument has rank 1
246 !ERROR: Actual argument associated with coarray dummy argument 'a=' must be a coarray
247 call coarray0(vector1)
248 !ERROR: Actual argument associated with coarray dummy argument 'a=' must be a coarray
249 call coarray0(vector1(1))
250 !ERROR: Rank of dummy argument is 0, but actual argument has rank 2
251 !ERROR: Actual argument associated with coarray dummy argument 'a=' must be a coarray
252 call coarray0(matrix11)
253 !ERROR: Actual argument associated with coarray dummy argument 'a=' must be a coarray
254 call coarray0(matrix11(1,1))
258 module char
259 contains
260 subroutine scalar(a)
261 character(2) a
263 subroutine explicit1(a)
264 character(2) a(2)
266 subroutine explicit2(a)
267 character(2) a(2,2)
269 subroutine assumedSize1(a)
270 character(2) a(*)
272 subroutine assumedSize2(a)
273 character(2) a(2,*)
275 subroutine assumedShape1(a)
276 character(2) a(:)
278 subroutine assumedShape2(a)
279 character(2) a(:,:)
281 subroutine assumedRank(a)
282 character(2) a(..)
284 subroutine allocatable0(a)
285 character(2), allocatable :: a
287 subroutine allocatable1(a)
288 character(2), allocatable :: a(:)
290 subroutine allocatable2(a)
291 character(2), allocatable :: a(:,:)
293 subroutine pointer0(a)
294 character(2), intent(in), pointer :: a
296 subroutine pointer1(a)
297 character(2), intent(in), pointer :: a(:)
299 subroutine pointer2(a)
300 character(2), intent(in), pointer :: a(:,:)
302 subroutine coarray0(a)
303 character(2) a[*]
306 subroutine test
307 character(2), target :: scalar0
308 character(2), target :: vector1(1), vector2(2), vector4(4)
309 character(2), target :: matrix11(1,1), matrix12(1,2), matrix22(2,2)
310 character(2), allocatable :: alloScalar, alloVector(:), alloMatrix(:,:)
312 call scalar(scalar0)
313 !ERROR: Rank of dummy argument is 0, but actual argument has rank 1
314 call scalar(vector1)
315 call scalar(vector1(1))
317 !ERROR: Actual argument has fewer characters remaining in storage sequence (2) than dummy argument 'a=' (4)
318 call explicit1(scalar0)
319 !ERROR: Actual argument array has fewer characters (2) than dummy argument 'a=' array (4)
320 call explicit1(vector1)
321 call explicit1(vector2)
322 call explicit1(vector4)
323 !ERROR: Actual argument has fewer characters remaining in storage sequence (2) than dummy argument 'a=' (4)
324 call explicit1(vector2(2))
325 !ERROR: Actual argument has fewer characters remaining in storage sequence (3) than dummy argument 'a=' (4)
326 call explicit1(vector2(1)(2:2))
327 call explicit1(vector4(3))
328 !ERROR: Actual argument has fewer characters remaining in storage sequence (2) than dummy argument 'a=' (4)
329 call explicit1(vector4(4))
330 !ERROR: Actual argument array has fewer characters (2) than dummy argument 'a=' array (4)
331 call explicit1(matrix11)
332 call explicit1(matrix12)
333 call explicit1(matrix12(1,1))
334 !ERROR: Actual argument has fewer characters remaining in storage sequence (3) than dummy argument 'a=' (4)
335 call explicit1(matrix12(1,1)(2:2))
336 !ERROR: Actual argument has fewer characters remaining in storage sequence (2) than dummy argument 'a=' (4)
337 call explicit1(matrix12(1,2))
339 !ERROR: Actual argument has fewer characters remaining in storage sequence (2) than dummy argument 'a=' (8)
340 call explicit2(scalar0)
341 !ERROR: Actual argument array has fewer characters (2) than dummy argument 'a=' array (8)
342 call explicit2(vector1)
343 !ERROR: Actual argument array has fewer characters (4) than dummy argument 'a=' array (8)
344 call explicit2(vector2)
345 call explicit2(vector4)
346 !ERROR: Actual argument has fewer characters remaining in storage sequence (2) than dummy argument 'a=' (8)
347 call explicit2(vector2(2))
348 !ERROR: Actual argument has fewer characters remaining in storage sequence (6) than dummy argument 'a=' (8)
349 call explicit2(vector4(2))
350 call explicit2(vector4(1))
351 !ERROR: Actual argument array has fewer characters (2) than dummy argument 'a=' array (8)
352 call explicit2(matrix11)
353 !ERROR: Actual argument array has fewer characters (4) than dummy argument 'a=' array (8)
354 call explicit2(matrix12)
355 call explicit2(matrix22)
356 call explicit2(matrix22(1,1))
357 !ERROR: Actual argument has fewer characters remaining in storage sequence (7) than dummy argument 'a=' (8)
358 call explicit2(matrix22(1,1)(2:2))
359 !ERROR: Actual argument has fewer characters remaining in storage sequence (6) than dummy argument 'a=' (8)
360 call explicit2(matrix22(2,1))
362 call assumedSize1(scalar0)
363 call assumedSize1(vector1)
364 call assumedSize1(vector2)
365 call assumedSize1(vector4)
366 call assumedSize1(vector2(2))
367 call assumedSize1(vector4(2))
368 call assumedSize1(vector4(1))
369 call assumedSize1(matrix11)
370 call assumedSize1(matrix12)
371 call assumedSize1(matrix22)
372 call assumedSize1(matrix22(1,1))
373 call assumedSize1(matrix22(2,1))
375 call assumedSize2(scalar0)
376 call assumedSize2(vector1)
377 call assumedSize2(vector2)
378 call assumedSize2(vector4)
379 call assumedSize2(vector2(2))
380 call assumedSize2(vector4(2))
381 call assumedSize2(vector4(1))
382 call assumedSize2(matrix11)
383 call assumedSize2(matrix12)
384 call assumedSize2(matrix22)
385 call assumedSize2(matrix22(1,1))
386 call assumedSize2(matrix22(2,1))
388 !ERROR: Scalar actual argument may not be associated with assumed-shape dummy argument 'a='
389 call assumedShape1(scalar0)
390 call assumedShape1(vector1)
391 call assumedShape1(vector2)
392 call assumedShape1(vector4)
393 !ERROR: Scalar actual argument may not be associated with assumed-shape dummy argument 'a='
394 call assumedShape1(vector2(2))
395 !ERROR: Rank of dummy argument is 1, but actual argument has rank 2
396 call assumedShape1(matrix11)
397 !ERROR: Rank of dummy argument is 1, but actual argument has rank 2
398 call assumedShape1(matrix12)
399 !ERROR: Rank of dummy argument is 1, but actual argument has rank 2
400 call assumedShape1(matrix22)
401 !ERROR: Scalar actual argument may not be associated with assumed-shape dummy argument 'a='
402 call assumedShape1(matrix22(1,1))
404 !ERROR: Scalar actual argument may not be associated with assumed-shape dummy argument 'a='
405 call assumedShape2(scalar0)
406 !ERROR: Rank of dummy argument is 2, but actual argument has rank 1
407 call assumedShape2(vector1)
408 !ERROR: Rank of dummy argument is 2, but actual argument has rank 1
409 call assumedShape2(vector2)
410 !ERROR: Rank of dummy argument is 2, but actual argument has rank 1
411 call assumedShape2(vector4)
412 !ERROR: Scalar actual argument may not be associated with assumed-shape dummy argument 'a='
413 call assumedShape2(vector2(2))
414 call assumedShape2(matrix11)
415 call assumedShape2(matrix12)
416 call assumedShape2(matrix22)
417 !ERROR: Scalar actual argument may not be associated with assumed-shape dummy argument 'a='
418 call assumedShape2(matrix22(1,1))
420 call assumedRank(scalar0)
421 call assumedRank(vector1)
422 call assumedRank(vector1(1))
423 call assumedRank(matrix11)
424 call assumedRank(matrix11(1,1))
426 !ERROR: ALLOCATABLE dummy argument 'a=' must be associated with an ALLOCATABLE actual argument
427 call allocatable0(scalar0)
428 call allocatable0(alloScalar)
429 !ERROR: Rank of dummy argument is 0, but actual argument has rank 1
430 call allocatable0(alloVector)
431 !ERROR: ALLOCATABLE dummy argument 'a=' must be associated with an ALLOCATABLE actual argument
432 call allocatable0(alloVector(1))
433 !ERROR: Rank of dummy argument is 0, but actual argument has rank 2
434 call allocatable0(alloMatrix)
435 !ERROR: ALLOCATABLE dummy argument 'a=' must be associated with an ALLOCATABLE actual argument
436 call allocatable0(alloMatrix(1,1))
438 !ERROR: Rank of dummy argument is 1, but actual argument has rank 0
439 !ERROR: ALLOCATABLE dummy argument 'a=' must be associated with an ALLOCATABLE actual argument
440 call allocatable1(scalar0)
441 !ERROR: Rank of dummy argument is 1, but actual argument has rank 0
442 call allocatable1(alloScalar)
443 call allocatable1(alloVector)
444 !ERROR: Rank of dummy argument is 1, but actual argument has rank 0
445 !ERROR: ALLOCATABLE dummy argument 'a=' must be associated with an ALLOCATABLE actual argument
446 call allocatable1(alloVector(1))
447 !ERROR: Rank of dummy argument is 1, but actual argument has rank 2
448 call allocatable1(alloMatrix)
449 !ERROR: Rank of dummy argument is 1, but actual argument has rank 0
450 !ERROR: ALLOCATABLE dummy argument 'a=' must be associated with an ALLOCATABLE actual argument
451 call allocatable1(alloMatrix(1,1))
453 !ERROR: Rank of dummy argument is 2, but actual argument has rank 0
454 !ERROR: ALLOCATABLE dummy argument 'a=' must be associated with an ALLOCATABLE actual argument
455 call allocatable2(scalar0)
456 !ERROR: Rank of dummy argument is 2, but actual argument has rank 0
457 call allocatable2(alloScalar)
458 !ERROR: Rank of dummy argument is 2, but actual argument has rank 1
459 call allocatable2(alloVector)
460 !ERROR: Rank of dummy argument is 2, but actual argument has rank 0
461 !ERROR: ALLOCATABLE dummy argument 'a=' must be associated with an ALLOCATABLE actual argument
462 call allocatable2(alloVector(1))
463 call allocatable2(alloMatrix)
464 !ERROR: Rank of dummy argument is 2, but actual argument has rank 0
465 !ERROR: ALLOCATABLE dummy argument 'a=' must be associated with an ALLOCATABLE actual argument
466 call allocatable2(alloMatrix(1,1))
468 call pointer0(scalar0)
469 !ERROR: Rank of dummy argument is 0, but actual argument has rank 1
470 !ERROR: Pointer has rank 0 but target has rank 1
471 call pointer0(vector1)
472 call pointer0(vector1(1))
473 !ERROR: Rank of dummy argument is 0, but actual argument has rank 2
474 !ERROR: Pointer has rank 0 but target has rank 2
475 call pointer0(matrix11)
476 call pointer0(matrix11(1,1))
478 !ERROR: Rank of dummy argument is 1, but actual argument has rank 0
479 !ERROR: Pointer has rank 1 but target has rank 0
480 call pointer1(scalar0)
481 call pointer1(vector1)
482 !ERROR: Rank of dummy argument is 1, but actual argument has rank 0
483 !ERROR: Pointer has rank 1 but target has rank 0
484 call pointer1(vector1(1))
485 !ERROR: Rank of dummy argument is 1, but actual argument has rank 2
486 !ERROR: Pointer has rank 1 but target has rank 2
487 call pointer1(matrix11)
488 !ERROR: Rank of dummy argument is 1, but actual argument has rank 0
489 !ERROR: Pointer has rank 1 but target has rank 0
490 call pointer1(matrix11(1,1))
492 !ERROR: Rank of dummy argument is 2, but actual argument has rank 0
493 !ERROR: Pointer has rank 2 but target has rank 0
494 call pointer2(scalar0)
495 !ERROR: Rank of dummy argument is 2, but actual argument has rank 1
496 !ERROR: Pointer has rank 2 but target has rank 1
497 call pointer2(vector1)
498 !ERROR: Rank of dummy argument is 2, but actual argument has rank 0
499 !ERROR: Pointer has rank 2 but target has rank 0
500 call pointer2(vector1(1))
501 call pointer2(matrix11)
502 !ERROR: Rank of dummy argument is 2, but actual argument has rank 0
503 !ERROR: Pointer has rank 2 but target has rank 0
504 call pointer2(matrix11(1,1))
506 !ERROR: Actual argument associated with coarray dummy argument 'a=' must be a coarray
507 call coarray0(scalar0)
508 !ERROR: Rank of dummy argument is 0, but actual argument has rank 1
509 !ERROR: Actual argument associated with coarray dummy argument 'a=' must be a coarray
510 call coarray0(vector1)
511 !ERROR: Actual argument associated with coarray dummy argument 'a=' must be a coarray
512 call coarray0(vector1(1))
513 !ERROR: Rank of dummy argument is 0, but actual argument has rank 2
514 !ERROR: Actual argument associated with coarray dummy argument 'a=' must be a coarray
515 call coarray0(matrix11)
516 !ERROR: Actual argument associated with coarray dummy argument 'a=' must be a coarray
517 call coarray0(matrix11(1,1))
519 !WARNING: Actual argument variable length '1' is less than expected length '2'
520 call scalar(scalar0(1:1))
521 !WARNING: Actual argument expression length '1' is less than expected length '2'
522 call scalar('a')
526 subroutine bug114080(arg, contigArg)
527 character(*) :: arg(..)
528 character(*), contiguous :: contigArg(..)
529 interface
530 subroutine sub1(arg1) bind(c)
531 character(1) :: arg1(2,4)
532 end subroutine
533 end interface
534 !ERROR: Assumed-rank character array may not be associated with a dummy argument that is not assumed-rank
535 call sub1(arg)
536 !ERROR: Assumed-rank character array may not be associated with a dummy argument that is not assumed-rank
537 call sub1(contigArg)
538 !ERROR: Assumed-rank character array may not be associated with a dummy argument that is not assumed-rank
539 call sub2(arg)
540 !ERROR: Assumed-rank character array may not be associated with a dummy argument that is not assumed-rank
541 call sub2(contigArg)
542 contains
543 subroutine sub2(arg2)
544 character(*) :: arg2(10)
545 end subroutine sub2
546 end subroutine