[Fortran, PR124484, v1] Fix testing caf_shmem on aarch64-*-linux was: [Linaro-TCWG-CI] gcc-16-7727-gaa09298cb017: 157 regressions on aarch64

Andre Vehreschild <[email protected]>
Newsgroups gmane.comp.gcc.patches,gmane.linux.linaro.toolchain,gmane.comp.gcc.regression,gmane.comp.gcc.fortran
Message-ID <20260313134503.1de2621a@vepi2>
Hi all,

the linaro CI reported test errors for aarch64 targets. I figured that for
aarch64 on linux the compile flags -pthread and -lrt are needed to link
caf_shmem and produce an executable. The attached patch addresses this by
special case for aarch64-*-linux* similiar to freebsd.

Regtested ok on aarch64-unknown-linux-gnu (cfarm185) and x86_64-linux-gnu /
F43. Ok for master?

Regards,
	Andre

On Thu, 12 Mar 2026 04:46:24 +0000 (UTC)
[email protected] wrote:

> Dear contributor,
> 
> Our automatic CI has detected problems related to your patch(es). Please find
> some details below.
> 
> In  master-aarch64, after:
>   | commit gcc-16-7727-gaa09298cb017
>   | Author: Andre Vehreschild <[email protected]>
>   | Date:   Wed Jun 18 09:26:22 2025 +0200
>   | 
>   |     Fortran: Enable coarray tests for multi image use [PR88076]
>   |     
>   |     Change some of regression tests to run on single and multiple images.
>   |     Add some new tests.
>   |     
>   | ... 29 lines of the commit log omitted.
> 
> Produces 157 regressions:
>   | 
>   | regressions.sum:
>   | Running gfortran:gfortran.dg/coarray/caf.exp ...
>   | FAIL: gfortran.dg/coarray/alloc_comp_1.f90 -fcoarray=lib  -O2
> -lcaf_shmem (test for excess errors) | UNRESOLVED:
> gfortran.dg/coarray/alloc_comp_1.f90 -fcoarray=lib  -O2  -lcaf_shmem
> compilation failed to produce executable | FAIL:
> gfortran.dg/coarray/alloc_comp_10.f90 -fcoarray=lib  -O2  -lcaf_shmem (test
> for excess errors) | UNRESOLVED: gfortran.dg/coarray/alloc_comp_10.f90
> -fcoarray=lib  -O2  -lcaf_shmem compilation failed to produce executable |
> ... and 153 more
> 
> Used configuration :
>  *CI config* tcwg_gnu_cross_check_gcc master-aarch64
>  *configure and test flags:* --target aarch64-linux-gnu 
> 
> We track this bug report under https://linaro.atlassian.net/browse/GNU-1860.
> Please let us know if you have a fix.
> 
> If you have any questions regarding this report, please ask on
> [email protected] mailing list.
> 
> -----------------8<--------------------------8<--------------------------8<--------------------------
> 
> The information below contains the details of the failures, and the ways to
> reproduce a debug environment:
> 
> You can find the failure logs in *.log.1.xz files in
>  *
> https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-aarch64-build/2614/artifact/artifacts/00-sumfiles/
> The full lists of regressions and improvements as well as configure and make
> commands are in
>  *
> https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-aarch64-build/2614/artifact/artifacts/notify/
> The list of [ignored] baseline and flaky failures are in
>  *
> https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-aarch64-build/2614/artifact/artifacts/sumfiles/xfails.xfail
> 
> Current build   :
> https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-aarch64-build/2614/artifact/artifacts
> Reference build :
> https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-aarch64-build/2613/artifact/artifacts
> 
> Instruction to reproduce the build :
> https://gitlab.com/LinaroLtd/tcwg/ci/interesting-commits/-/raw/master/gcc/sha1/aa09298cb017ff8c3224166b33204662174822df/tcwg_gnu_cross_check_gcc/master-aarch64/reproduction_instructions.txt
> 
> Full commit : See in git+ssh://[email protected]/git/gcc.git


-- 
Andre Vehreschild * Email: vehre ad gmx dot de
pr124484_1.patch (text/x-patch, 1.3 KB)
From c32b4598b980f1851d07fea9a20c8cb566c963a2 Mon Sep 17 00:00:00 2001
From: Andre Vehreschild <[email protected]>
Date: Fri, 13 Mar 2026 12:24:41 +0100
Subject: [PATCH] Fortran: Fix tests on aarch64-linux-gnu [PR124484]

gcc/testsuite/ChangeLog:

	PR Fortran/124484
	* gfortran.dg/coarray/caf.exp: Add -pthread and -lrt for
	aarch64-*-linux* targets for caf_shmem testing.
---
 gcc/testsuite/gfortran.dg/coarray/caf.exp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/gfortran.dg/coarray/caf.exp b/gcc/testsuite/gfortran.dg/coarray/caf.exp
index 3db249a920f8..d975b5102553 100644
--- a/gcc/testsuite/gfortran.dg/coarray/caf.exp
+++ b/gcc/testsuite/gfortran.dg/coarray/caf.exp
@@ -123,7 +123,11 @@ foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ]]
             if { [istarget *-*-freebsd*] } {
                 dg-test $test "-fcoarray=lib -pthread $flags -lcaf_shmem" {}
             } else {
-                dg-test $test "-fcoarray=lib $flags -lcaf_shmem" {}
+                if { [istarget aarch64-*-linux*] } {
+                    dg-test $test "-fcoarray=lib -pthread -lrt $flags -lcaf_shmem" {}
+                } else {
+                    dg-test $test "-fcoarray=lib $flags -lcaf_shmem" {}
+                }
             }
             cleanup-modules ""
         }
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.