[From nobody Thu Jun  4 07:21:06 2026
Received: (at submit) by bugs.debian.org; 12 May 2026 06:33:28 +0000
X-Spam-Checker-Version: SpamAssassin 4.0.1-bugs.debian.org_2005_01_02
 (2024-03-25) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-109.4 required=4.0 tests=BAYES_00,DKIMWL_WL_HIGH,
 DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FOURLA,FROMDEVELOPER,
 SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DKIM_WELCOMELIST,
 XMAILER_REPORTBUG autolearn=ham autolearn_force=no
 version=4.0.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 40; hammy, 150; neutral, 86; spammy,
 0. spammytokens:
 hammytokens:0.000-+--Hx-spam-relays-external:sk:stravin,
 0.000-+--H*RT:sk:stravin, 0.000-+--Hx-spam-relays-external:311,
 0.000-+--H*RT:311, 0.000-+--H*RT:108
Return-path: &lt;mckinstry@debian.org&gt;
Received: from stravinsky.debian.org ([2001:41b8:202:deb::311:108]:40636)
 by buxtehude.debian.org with esmtps
 (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
 (Exim 4.96) (envelope-from &lt;mckinstry@debian.org&gt;)
 id 1wMggJ-0083HU-2O for submit@bugs.debian.org;
 Tue, 12 May 2026 06:33:27 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; 
 s=smtpauto.stravinsky;
 h=X-Debian-User:Date:Message-ID:Subject:To:From:
 Content-Transfer-Encoding:MIME-Version:Content-Type:Reply-To:Cc:Content-ID:
 Content-Description:In-Reply-To:References;
 bh=j4cCB1YPW9060G3JzfQeuzpC9FYl0rv+EZLPsVeD70U=; b=TQGR1dClko5qORib2igBCdI4G3
 XJtR8bNkNNTaSgjsft1uWztOD900yNjRagu2147MkOqKu0iNn08sA9PuiL0OyFle6LSVi7avLAwtg
 WsCpjOv9e8OF7aVqf8+yGWJNCC/OZzHhNqIRXx5Y9f7xx/Op2W2/O96YwNC1+bcnnweQ8YEi54LPU
 WEOZnIy1jcpH5PNpQNhPNX8ngO56ZixBAcW86sQ5RbGzkaOCstik9QGkkL6tqug6TQFVnOyl1mcL8
 449ty0fAu6gBw1xXKoT0oMTXrU73jbwsFdwtGhX8WXmZLnG8Gzc/gtasdTNA7OkFONc7dTbHw5cYt
 Bia29Asg==;
Received: from authenticated user by stravinsky.debian.org with esmtpsa
 (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
 (Exim 4.96) (envelope-from &lt;mckinstry@debian.org&gt;)
 id 1wMggH-002BMe-2u; Tue, 12 May 2026 06:33:26 +0000
Received: from localhost (localhost [127.0.0.1])
 by mail.mckinstry.ie (Postfix) with ESMTP id C56E6F0151D;
 Tue, 12 May 2026 07:33:14 +0100 (IST)
Received: from mail.mckinstry.ie ([127.0.0.1])
 by localhost (mckinstry.ie [127.0.0.1]) (amavis, port 10024) with ESMTP
 id 0BbmhURIn0WC; Tue, 12 May 2026 07:33:14 +0100 (IST)
Received: by mail.mckinstry.ie (Postfix, from userid 1000)
 id ADBB6F06233; Tue, 12 May 2026 07:33:14 +0100 (IST)
Content-Type: text/plain; charset=&quot;us-ascii&quot;
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Alastair McKinstry &lt;mckinstry@debian.org&gt;
To: Debian Bug Tracking System &lt;submit@bugs.debian.org&gt;
Subject: llvm-toolchain-22: Please enable PRIF (coarray) support
Message-ID: &lt;177856759468.3695745.17423644297022008047.reportbug@mail.mckinstry.ie&gt;
X-Mailer: reportbug 13.2.0
Date: Tue, 12 May 2026 07:33:14 +0100
X-Debian-User: mckinstry
Delivered-To: submit@bugs.debian.org

Source: llvm-toolchain-22
Version: 1:22.1.5-1
Severity: normal
Tags: patch

Please enable PRIF support in flang-22+ for coarrays.
Flang since 22+ has experimental support for co-arrays:

```
alastair@sid:~/deb-packages/llvm$ cat hello.f90
program main
  implicit none
  write (*,*) &quot;Hello from image&quot;, this_image(), &quot;of&quot;, num_images()
end program main

$ flang-22 -o hello hello.f90 -fcoarray -lcaffeine-smp -lgasnet-smp-seq -L/usr/lib/aarch64-linux-gnu/fortran/flang/ -lassert
warning: Support for multi image Fortran features is still experimental and in development.

$ alastair@sid:~/deb-packages/llvm$ gasnetrun_smp -n 2 ./hello
 Hello from image 1 of 2
 Hello from image 2 of 2
 
```
currently static libraries, so multiple needed for linking. 
Try building caffeine with shared libs.

llvm-22, patch debian/rules:
```
ifneq (,$(filter $(DEB_HOST_ARCH), $(FLANG_ARCHS)))
    PROJECTS += ;flang
    RUNTIMES += ;flang-rt
+    STAGE_ALL_CMAKE_EXTRA += -DFLANG_ENABLE_PRIF=ON
endif
```

(I am the maintainer of fortran-caffeine and gasnet, the libraries that supply PRIF for flang.
coarray support is under active development)

Thanks
Alastair


-- System Information:
Debian Release: 13.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.12.73+deb13-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_IE.UTF-8), LANGUAGE=en_IE:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
]