Commit 2d956d2
authored
[flang] fix ICE with ignore_tkr(tk) character in explicit interface (llvm#140885)
Some MPI libraries use character dummies + ignore(TKR) to allow passing
any kind of buffer.
This was meant to already be handled by llvm#108168
However, when the library interface also had an argument requiring an
explicit interface, `builder.convertWithSemantics` was not allowed to properly deal
with the actual/dummy type mismatch and generated bad IR causing errors like:
`'fir.convert' op invalid type conversion'!fir.ref' / '!fir.boxchar\<1\>'`.
This restriction was artificial, lowering should just handle any cases
allowed by semantics. Just remove it.1 parent dc29901 commit 2d956d2
File tree
2 files changed
+27
-2
lines changed- flang
- lib/Lower
- test/Lower/HLFIR
2 files changed
+27
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
489 | | - | |
490 | 489 | | |
491 | 490 | | |
492 | 491 | | |
| |||
518 | 517 | | |
519 | 518 | | |
520 | 519 | | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
521 | 527 | | |
522 | 528 | | |
523 | 529 | | |
524 | | - | |
| 530 | + | |
525 | 531 | | |
526 | 532 | | |
527 | 533 | | |
| |||
1446 | 1452 | | |
1447 | 1453 | | |
1448 | 1454 | | |
| 1455 | + | |
| 1456 | + | |
1449 | 1457 | | |
1450 | 1458 | | |
1451 | 1459 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
11 | 18 | | |
12 | 19 | | |
13 | 20 | | |
| |||
32 | 39 | | |
33 | 40 | | |
34 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
35 | 52 | | |
0 commit comments