llvm-project
260e155c - [flang] Enumeration Type: (PR 5/5) Enable (#231641)

Commit
7 days ago
[flang] Enumeration Type: (PR 5/5) Enable (#231641) Enable the F2023 ENUMERATION TYPE (7.6.2) by default and remove the development gate. - Remove `-fenumeration-type` / `-fno-enumeration-type`, `LanguageFeature::EnumerationType` and the experimental-support warning. - Update tests to run without the flag. - Update ReleaseNotes.md, Extensions.md and FortranStandardsSupport.md. New declaration checks. An enumeration type is not a derived type, so it is not extensible and has no type parameters. Flang now diagnoses: - `EXTENDS(enum)`, rejected early so that no parent component is created - `CLASS(enum)`, including in a FUNCTION prefix and in IMPLICIT - `CLASSOF(enum)`; Flang requires an extensible type here (see Extensions.md) - `CLASS IS (enum)` in SELECT TYPE - `TYPE IS (enum)` unless the selector is unlimited polymorphic - pointer assignment of an enumeration-type pointer from a `CLASS(*)` target - an enumeration type as the dtv argument of a defined I/O procedure - `SAME_TYPE_AS` / `EXTENDS_TYPE_OF` with an enumeration-type argument - a type-param-spec-list on an enumeration type, e.g. `type(state(1))` Compatibility: NEXT and PREVIOUS are now intrinsic functions. A reference to an external function with either name now needs an EXTERNAL declaration or an explicit interface. A CALL to an external subroutine with either name is unaffected. Known limitations: - #231638 - #231636 - #229873 - #230617 Fixes #183789 Assisted-by: AI (Some of the implementation and feature checklist utilized Claude).
Author
Parents
Loading