Commit 4a3ae63
committed
[flang] Allow host-associated INTENT(OUT) in specification expr.
Nearly, but not all, other compilers have a blanket prohibition
against the use of an INTENT(OUT) dummy argument in a specification
expression. Some compilers, however, permit an INTENT(OUT) dummy
argument to appear in a specification expression in a BLOCK construct
or inner procedure via host association.
The argument some have put forth to accept this usage comes from
a reading of 10.1.11 (specification expressions) in Fortran 2023
that, if followed consistently, would also require host-associated
OPTIONAL dummy argument to be allowed. That would be dangerous
for reasons that should be obvious.
However, I can agree that a non-OPTIONAL dummy argument can't be
assumed to remain undefined on entry to a BLOCK construct or inner
procedure, so we can accept host-associated INTENT(OUT) in specification
expressions with a portability warning.1 parent cd56666 commit 4a3ae63
File tree
5 files changed
+53
-9
lines changed- flang
- docs
- include/flang/Support
- lib
- Evaluate
- Support
- test/Semantics
5 files changed
+53
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
825 | 825 | | |
826 | 826 | | |
827 | 827 | | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
828 | 841 | | |
829 | 842 | | |
830 | 843 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
| 548 | + | |
| 549 | + | |
548 | 550 | | |
549 | 551 | | |
550 | 552 | | |
| |||
563 | 565 | | |
564 | 566 | | |
565 | 567 | | |
566 | | - | |
| 568 | + | |
567 | 569 | | |
568 | 570 | | |
569 | 571 | | |
570 | | - | |
571 | | - | |
572 | | - | |
| 572 | + | |
573 | 573 | | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
574 | 590 | | |
575 | | - | |
| 591 | + | |
576 | 592 | | |
577 | 593 | | |
578 | 594 | | |
| |||
582 | 598 | | |
583 | 599 | | |
584 | 600 | | |
585 | | - | |
| 601 | + | |
586 | 602 | | |
587 | 603 | | |
588 | 604 | | |
| |||
831 | 847 | | |
832 | 848 | | |
833 | 849 | | |
834 | | - | |
| 850 | + | |
835 | 851 | | |
836 | | - | |
| 852 | + | |
837 | 853 | | |
838 | 854 | | |
839 | 855 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
31 | 44 | | |
32 | 45 | | |
33 | 46 | | |
| |||
0 commit comments