[all-commits] [llvm/llvm-project] c08274: Enumeration Type Sem-3: Intrinsics + I/O + Module ...

kwyatt-ext via All-commits all-commits at lists.llvm.org
Fri Sep 11 06:02:50 PDT 2026


  Branch: refs/heads/users/kwyatt-ext/enum-sem-3
  Home:   https://github.com/llvm/llvm-project
  Commit: c08274f029cd90e76e0c63c2b7f1af7d8567ab61
      https://github.com/llvm/llvm-project/commit/c08274f029cd90e76e0c63c2b7f1af7d8567ab61
  Author: Kevin Wyatt <kwyatt at hpe.com>
  Date:   2026-09-10 (Thu, 10 Sep 2026)

  Changed paths:
    M flang-rt/include/flang-rt/runtime/stat.h
    M flang-rt/lib/runtime/stat.cpp
    M flang/include/flang/Runtime/magic-numbers.h
    M flang/lib/Evaluate/fold-implementation.h
    M flang/lib/Evaluate/intrinsics.cpp
    M flang/lib/Semantics/check-io.cpp
    M flang/lib/Semantics/mod-file.cpp
    M flang/lib/Semantics/mod-file.h
    M flang/lib/Semantics/type.cpp

  Log Message:
  -----------
  Enumeration Type Sem-3: Intrinsics + I/O + Module Files (PRs 6-8)

Adds enumeration type intrinsics (HUGE, NEXT, PREVIOUS, INT) with
constant folding, STAT argument support with boundary detection,
formatted I/O rejection for enumeration types, module file round-trip
support, and runtime STAT_ENUM_BOUNDARY error code.

Files from original PRs 6-8 (including PREVIOUS intrinsic from PR 7).


  Commit: 759b40ad9c207007e314134a8a86109855b5ed90
      https://github.com/llvm/llvm-project/commit/759b40ad9c207007e314134a8a86109855b5ed90
  Author: Kevin Wyatt <kwyatt at hpe.com>
  Date:   2026-09-10 (Thu, 10 Sep 2026)

  Changed paths:
    A flang/test/Semantics/enumeration-type-intrinsics.f90
    A flang/test/Semantics/enumeration-type-io.f90
    A flang/test/Semantics/enumeration-type-mod.f90

  Log Message:
  -----------
  Adding test cases.


  Commit: b1e352c6ed0b0ac9b3166737b20d231acb8da7f7
      https://github.com/llvm/llvm-project/commit/b1e352c6ed0b0ac9b3166737b20d231acb8da7f7
  Author: Kevin Wyatt <kwyatt at hpe.com>
  Date:   2026-09-10 (Thu, 10 Sep 2026)

  Changed paths:
    M flang/lib/Evaluate/fold-implementation.h
    M flang/lib/Evaluate/intrinsics.cpp
    M flang/test/Semantics/enumeration-type-intrinsics.f90
    M flang/test/Semantics/enumeration-type-io.f90
    M flang/test/Semantics/enumeration-type-mod.f90

  Log Message:
  -----------
  Gated NEXT/PREVIOUS lowering with a temporary error.

Fixed INT to utilize the same KIND conversion logic as the normal INT.


  Commit: aba12578e4eeab9027479084b6e5e4ce67f5ce30
      https://github.com/llvm/llvm-project/commit/aba12578e4eeab9027479084b6e5e4ce67f5ce30
  Author: Kevin Wyatt <kwyatt at hpe.com>
  Date:   2026-09-10 (Thu, 10 Sep 2026)

  Changed paths:
    M flang/lib/Evaluate/fold-implementation.h
    M flang/lib/Evaluate/fold-integer.cpp
    M flang/lib/Evaluate/intrinsics.cpp
    M flang/lib/Semantics/resolve-names.cpp
    A flang/test/Semantics/enumeration-type-intrinsics-array-fold.f90
    A flang/test/Semantics/enumeration-type-intrinsics-gating.f90
    A flang/test/Semantics/enumeration-type-intrinsics-keyword.f90
    A flang/test/Semantics/enumeration-type-intrinsics-nonenum.f90
    M flang/test/Semantics/enumeration-type-intrinsics.f90

  Log Message:
  -----------
  Incorporated the following fixes:

- Fold enum INT/NEXT/PREVIOUS over constant array arguments elementwise
- Enumeration Type inlines HUGE/INT/NEXT/PREVIOUS now look at argument by keyword.
- Gated and report an error on NEXT/PREVIOUS intrinsic use.


  Commit: 763122a95edb502c69487f85aa36d8d417520bc9
      https://github.com/llvm/llvm-project/commit/763122a95edb502c69487f85aa36d8d417520bc9
  Author: Kevin Wyatt <kwyatt at hpe.com>
  Date:   2026-09-10 (Thu, 10 Sep 2026)

  Changed paths:
    M flang/include/flang/Semantics/symbol.h
    M flang/lib/Semantics/mod-file.cpp
    M flang/lib/Semantics/mod-file.h
    M flang/lib/Semantics/resolve-names.cpp
    M flang/test/Semantics/enumeration-type-mod.f90

  Log Message:
  -----------
  Added new flag to emit enumerators based on flag status, not order.  This fixes the problem with an accessor being forward declared.


  Commit: 05a9d0c86a0a98cbc0036947e4897295d60d41b2
      https://github.com/llvm/llvm-project/commit/05a9d0c86a0a98cbc0036947e4897295d60d41b2
  Author: Kevin Wyatt <kwyatt at hpe.com>
  Date:   2026-09-10 (Thu, 10 Sep 2026)

  Changed paths:
    M flang/lib/Semantics/check-io.cpp
    M flang/lib/Semantics/mod-file.cpp
    M flang/test/Semantics/enumeration-type-io.f90

  Log Message:
  -----------
  Corrected IO restrictions to handle components and make restrictions consistent.


  Commit: f3252fb0c9a6cf4a478238185fda430ad947447b
      https://github.com/llvm/llvm-project/commit/f3252fb0c9a6cf4a478238185fda430ad947447b
  Author: Kevin Wyatt <kwyatt at hpe.com>
  Date:   2026-09-10 (Thu, 10 Sep 2026)

  Changed paths:
    M flang/lib/Evaluate/intrinsics.cpp
    M flang/lib/Semantics/check-io.cpp
    M flang/lib/Semantics/resolve-names.cpp

  Log Message:
  -----------
  Added detection to prevent extraneous errors.
Corrected component iteration to correctly handle defined I/O of enumeration type components.


  Commit: 2e0fd016f9f00fae76259e12decbd21ac1ed585d
      https://github.com/llvm/llvm-project/commit/2e0fd016f9f00fae76259e12decbd21ac1ed585d
  Author: Kevin Wyatt <kwyatt at hpe.com>
  Date:   2026-09-10 (Thu, 10 Sep 2026)

  Changed paths:
    M flang/lib/Semantics/check-io.cpp
    M flang/test/Semantics/enumeration-type-intrinsics-gating.f90
    M flang/test/Semantics/enumeration-type-io.f90

  Log Message:
  -----------
  Added test cases and corrected error text.


  Commit: 1d01fad50160c33b77bb42298b97c3f4c836b23a
      https://github.com/llvm/llvm-project/commit/1d01fad50160c33b77bb42298b97c3f4c836b23a
  Author: Kevin Wyatt <kwyatt at hpe.com>
  Date:   2026-09-10 (Thu, 10 Sep 2026)

  Changed paths:
    M flang/lib/Semantics/check-io.cpp
    A flang/test/Semantics/enumeration-type-io-pdt-order.f90

  Log Message:
  -----------
  Modified to erase visited on recursion return.  Added a test that demonstrates the issue and fix.


  Commit: 81ffd9cde8a01eee92c0f460875b578bce2766c1
      https://github.com/llvm/llvm-project/commit/81ffd9cde8a01eee92c0f460875b578bce2766c1
  Author: Kevin Wyatt <kwyatt at hpe.com>
  Date:   2026-09-10 (Thu, 10 Sep 2026)

  Changed paths:
    M flang/docs/Intrinsics.md
    M flang/include/flang/Evaluate/common.h
    M flang/include/flang/Evaluate/type.h
    M flang/include/flang/Semantics/symbol.h
    M flang/lib/Evaluate/check-expression.cpp
    M flang/lib/Evaluate/fold-implementation.h
    M flang/lib/Evaluate/fold-integer.cpp
    M flang/lib/Evaluate/intrinsics.cpp
    M flang/lib/Evaluate/tools.cpp
    M flang/lib/Evaluate/type.cpp
    M flang/lib/Semantics/check-io.cpp
    M flang/lib/Semantics/check-namelist.cpp
    M flang/lib/Semantics/mod-file.cpp
    M flang/lib/Semantics/resolve-names.cpp
    M flang/test/Semantics/enumeration-type-intrinsics.f90
    M flang/test/Semantics/enumeration-type-io.f90
    M flang/test/Semantics/enumeration-type-mod.f90

  Log Message:
  -----------
  Did the following:
  - Updated intrinsic.md document
  - Simplified the code per recommendations
  - Fixed constant folding to be context aware and only report errors
    in constant expressions.  Otherwise they are left for runtime.
  - Corrected namelist declaration error.
  - Corrected enumeration type attributes.
  - Added/modified test cases are appropriate.


  Commit: fb5351bbf80733410dcbd2f99d42d2f02adf8db0
      https://github.com/llvm/llvm-project/commit/fb5351bbf80733410dcbd2f99d42d2f02adf8db0
  Author: Kevin Wyatt <kwyatt at hpe.com>
  Date:   2026-09-10 (Thu, 10 Sep 2026)

  Changed paths:
    M flang/lib/Semantics/check-io.cpp
    M flang/test/Semantics/enumeration-type-io-pdt-order.f90

  Log Message:
  -----------
  Corrected the recursion block to have memory, preventing exponential blowup.  I also tested this with an ad-hoc test and verified the problem and fix.
Added a couple of test cases to demonstrate that order does not prevent error detection.


  Commit: e13288560067f58e35c67bf707c027d4d886d241
      https://github.com/llvm/llvm-project/commit/e13288560067f58e35c67bf707c027d4d886d241
  Author: Kevin Wyatt <kwyatt at hpe.com>
  Date:   2026-09-10 (Thu, 10 Sep 2026)

  Changed paths:
    M flang/lib/Evaluate/fold-implementation.h
    M flang/lib/Semantics/check-io.cpp
    M flang/lib/Semantics/mod-file.cpp
    M flang/lib/Semantics/type.cpp
    M flang/test/Semantics/enumeration-type-intrinsics.f90
    A flang/test/Semantics/enumeration-type-mod-readback.F90
    M flang/test/Semantics/enumeration-type-mod.f90

  Log Message:
  -----------
  Updated with the following changes:
  - Modified to report an error on boundary condition.
  - Modified tests for the boundary error message.
  - Corrected accessibility attributes by giving explicit attributes as needed.
  - Added regression test for attributes.
  - Reworded incorrect comment.
  - Switched to originalTypeSymbol to use in-scope name.
  - Added test case to verify pre-built mod name usage.


  Commit: 7f4567735f85acc2ed804cc97a53f619209e2267
      https://github.com/llvm/llvm-project/commit/7f4567735f85acc2ed804cc97a53f619209e2267
  Author: Kevin Wyatt <kwyatt at hpe.com>
  Date:   2026-09-10 (Thu, 10 Sep 2026)

  Changed paths:
    M flang/test/Semantics/enumeration-type-intrinsics.f90

  Log Message:
  -----------
  Added an AI identified missing test case, int() with a bad kind.


  Commit: 9f7bc85f0a21eda246817b1a108f4503b46b2804
      https://github.com/llvm/llvm-project/commit/9f7bc85f0a21eda246817b1a108f4503b46b2804
  Author: Kevin Wyatt <kwyatt at hpe.com>
  Date:   2026-09-10 (Thu, 10 Sep 2026)

  Changed paths:
    M flang/docs/Extensions.md
    M flang/lib/Semantics/check-io.cpp
    M flang/lib/Semantics/check-namelist.cpp
    M flang/test/Semantics/enumeration-type-io-pdt-order.f90
    M flang/test/Semantics/enumeration-type-io.f90

  Log Message:
  -----------
  Enhanced the check for enumerations in namelist objects at declaration time and remove the I/O time check.  This captures the C8109 restrictions completely.  Added test cases from reviewer to demonstrate the fix.


Compare: https://github.com/llvm/llvm-project/compare/c9a9ff29cbdc...9f7bc85f0a21

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list