From 0ae0ee03619a0db2f8d754d2ea049d2a55e656f7 Mon Sep 17 00:00:00 2001 From: kwyatt-ext Date: Mon, 23 Mar 2026 14:05:06 -0500 Subject: [PATCH] [flang] Adding a new extension that was noticed to be intentionally in the code. (#182891) The flang compiler intentionally issues a warning on duplicate prefix-specs for procedures. This is not consistent with the standard which says "shall contain at most one of each". Other tested compilers correctly issue an error. It is safe to leave this as a warning. It can be turned into an error condition by using the "-Werror" flag. However, it should be noted in the Extensions document, similar to the mention of the SAVE attribute. --- flang/docs/Extensions.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flang/docs/Extensions.md b/flang/docs/Extensions.md index 17d01d81d329..f2770f0a7271 100644 --- a/flang/docs/Extensions.md +++ b/flang/docs/Extensions.md @@ -483,6 +483,9 @@ end are to the same value. Distinct initializations remain errors. * A pointer component that has no default initialization or explicit value in a structure constructor is defaulted to `NULL()`. +* Multiple specifications of a prefix-spec on the same procedure are allowed, + with a warning. C1552 (F2023) specifies that at most one of each shall be + present. * An assumed-rank entity is an acceptable `NAMELIST` group item. * A named constant (`PARAMETER`) may appear as a `namelist-group-object` in a `NAMELIST` statement. The Fortran standard requires namelist group objects