|
107 | 107 | These definitions yield fairly poor results due to floating-point |
108 | 108 | cancellation, and every Fortran compiler (including this one) |
109 | 109 | uses better algorithms. |
110 | | -* When an index variable of a `FORALL` or `DO CONCURRENT` is present |
111 | | - in the enclosing scope, and the construct does not have an explicit |
112 | | - type specification for its index variables, some weird restrictions |
113 | | - in F'2023 subclause 19.4 paragraphs 6 & 8 should apply. Since this |
114 | | - compiler properly scopes these names, violations of these restrictions |
115 | | - elicit only portability warnings by default. |
116 | 110 | * The rules for pairwise distinguishing the specific procedures of a |
117 | 111 | generic interface are inadequate, as admitted in note C.11.6 of F'2023. |
118 | 112 | Generic interfaces whose specific procedures can be easily proven by |
|
728 | 722 | array and structure constructors not to be finalized, so it also makes sense |
729 | 723 | not to finalize their allocatable components when releasing their storage). |
730 | 724 |
|
| 725 | +* F'2023 19.4 paragraph 5: "If integer-type-spec appears in data-implied-do or |
| 726 | + ac-implied-do-control it has the specified type and type parameters; otherwise |
| 727 | + it has the type and type parameters that it would have if it were the name of |
| 728 | + a variable in the innermost executable construct or scoping unit that includes |
| 729 | + the DATA statement or array constructor, and this type shall be integer type." |
| 730 | + Reading "would have if it were" as being the subjunctive, this would mean that |
| 731 | + an untyped implied DO index variable should be implicitly typed according to |
| 732 | + the rules active in the enclosing scope. But all other Fortran compilers interpret |
| 733 | + the "would have if it were" as meaning "has if it is" -- i.e., if the name |
| 734 | + is visible in the enclosing scope, the type of that name is used as the |
| 735 | + type of the implied DO index. So this is an error, not a simple application |
| 736 | + of the default implicit typing rule: |
| 737 | +``` |
| 738 | +character j |
| 739 | +print *, [(j,j=1,10)] |
| 740 | +``` |
| 741 | + |
731 | 742 | ## De Facto Standard Features |
732 | 743 |
|
733 | 744 | * `EXTENDS_TYPE_OF()` returns `.TRUE.` if both of its arguments have the |
|
0 commit comments